VS: Refactor internal generator factory logic
Consume the space before the platform name as soon as possible instead of including it in the comparison.
This commit is contained in:
parent
2b3e7b6f94
commit
eaa9f2f8ee
@ -48,11 +48,13 @@ public:
|
||||
const char* p = cmVS10GenName(name, genName);
|
||||
if(!p)
|
||||
{ return 0; }
|
||||
if(strcmp(p, "") == 0)
|
||||
if(!*p)
|
||||
{
|
||||
return new cmGlobalVisualStudio10Generator(
|
||||
genName, "", "");
|
||||
}
|
||||
if(*p++ != ' ')
|
||||
{ return 0; }
|
||||
if(strcmp(p, "Win64") == 0)
|
||||
{
|
||||
return new cmGlobalVisualStudio10Generator(
|
||||
|
@ -43,11 +43,13 @@ public:
|
||||
const char* p = cmVS11GenName(name, genName);
|
||||
if(!p)
|
||||
{ return 0; }
|
||||
if(strcmp(p, "") == 0)
|
||||
if(!*p)
|
||||
{
|
||||
return new cmGlobalVisualStudio11Generator(
|
||||
genName, "", "");
|
||||
}
|
||||
if(*p++ != ' ')
|
||||
{ return 0; }
|
||||
if(strcmp(p, "Win64") == 0)
|
||||
{
|
||||
return new cmGlobalVisualStudio11Generator(
|
||||
@ -59,11 +61,6 @@ public:
|
||||
genName, "ARM", "");
|
||||
}
|
||||
|
||||
if(*p++ != ' ')
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::set<std::string> installedSDKs =
|
||||
cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs();
|
||||
|
||||
|
@ -43,11 +43,13 @@ public:
|
||||
const char* p = cmVS12GenName(name, genName);
|
||||
if(!p)
|
||||
{ return 0; }
|
||||
if(strcmp(p, "") == 0)
|
||||
if(!*p)
|
||||
{
|
||||
return new cmGlobalVisualStudio12Generator(
|
||||
genName, "", "");
|
||||
}
|
||||
if(*p++ != ' ')
|
||||
{ return 0; }
|
||||
if(strcmp(p, "Win64") == 0)
|
||||
{
|
||||
return new cmGlobalVisualStudio12Generator(
|
||||
|
Loading…
x
Reference in New Issue
Block a user