summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio11Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-04 20:35:34 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-09 14:59:55 (GMT)
commiteaa9f2f8eeaacb8df762efa5f7f95820aac06729 (patch)
treecd07dfe9223fd4c300168cca9e0b2298482403ba /Source/cmGlobalVisualStudio11Generator.cxx
parent2b3e7b6f943d525cd02c13daacd596f17d100fd4 (diff)
downloadCMake-eaa9f2f8eeaacb8df762efa5f7f95820aac06729.zip
CMake-eaa9f2f8eeaacb8df762efa5f7f95820aac06729.tar.gz
CMake-eaa9f2f8eeaacb8df762efa5f7f95820aac06729.tar.bz2
VS: Refactor internal generator factory logic
Consume the space before the platform name as soon as possible instead of including it in the comparison.
Diffstat (limited to 'Source/cmGlobalVisualStudio11Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio11Generator.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
index 7033f2a..fa134fc 100644
--- a/Source/cmGlobalVisualStudio11Generator.cxx
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -43,27 +43,24 @@ public:
const char* p = cmVS11GenName(name, genName);
if(!p)
{ return 0; }
- if(strcmp(p, "") == 0)
+ if(!*p)
{
return new cmGlobalVisualStudio11Generator(
genName, "", "");
}
- if(strcmp(p, " Win64") == 0)
+ if(*p++ != ' ')
+ { return 0; }
+ if(strcmp(p, "Win64") == 0)
{
return new cmGlobalVisualStudio11Generator(
genName, "x64", "CMAKE_FORCE_WIN64");
}
- if(strcmp(p, " ARM") == 0)
+ if(strcmp(p, "ARM") == 0)
{
return new cmGlobalVisualStudio11Generator(
genName, "ARM", "");
}
- if(*p++ != ' ')
- {
- return 0;
- }
-
std::set<std::string> installedSDKs =
cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs();