diff options
author | Mark Salisbury <mark.salisbury@hp.com> | 2014-05-22 17:45:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-05-28 20:32:56 (GMT) |
commit | b684ce58dde41162179ab1cc6a0558e269bfd209 (patch) | |
tree | b912ae76554060f362c70412c715c4698cd4bcad | |
parent | cbc9a9514d0dd00b35b3de694dab02a387ec2b52 (diff) | |
download | CMake-b684ce58dde41162179ab1cc6a0558e269bfd209.zip CMake-b684ce58dde41162179ab1cc6a0558e269bfd209.tar.gz CMake-b684ce58dde41162179ab1cc6a0558e269bfd209.tar.bz2 |
VS: Use lower-case boolean values in VS 7-9 (#14927)
The VS 7-9 IDEs parse .vcproj file boolean values in lower or upper
case. The .NET XML parsing chokes on anything but "true", "false", "0",
"1". Teach our generators to use lower-case names since they will work
for both parsers. Our VS >= 10 flag tables already use lower-case.
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 6 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 56 |
2 files changed, 31 insertions, 31 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index bb63289..9215c54 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -1017,11 +1017,11 @@ static cmVS7FlagTable cmVS7ExtraFlagTable[] = cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue}, {"PrecompiledHeaderThrough", "Yu", "Precompiled Header Name", "", cmVS7FlagTable::UserValueRequired}, - {"WholeProgramOptimization", "LTCG", "WholeProgramOptimization", "TRUE", 0}, + {"WholeProgramOptimization", "LTCG", "WholeProgramOptimization", "true", 0}, // Exception handling mode. If no entries match, it will be FALSE. - {"ExceptionHandling", "GX", "enable c++ exceptions", "TRUE", 0}, - {"ExceptionHandling", "EHsc", "enable c++ exceptions", "TRUE", 0}, + {"ExceptionHandling", "GX", "enable c++ exceptions", "true", 0}, + {"ExceptionHandling", "EHsc", "enable c++ exceptions", "true", 0}, // The EHa option does not have an IDE setting. Let it go to false, // and have EHa passed on the command line by leaving out the table // entry. diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 212b06b..c7e7b1a 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -486,34 +486,34 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] = cmVS7FlagTable::UserValue}, // boolean flags - {"BufferSecurityCheck", "GS", "Buffer security check", "TRUE", 0}, - {"BufferSecurityCheck", "GS-", "Turn off Buffer security check", "FALSE", 0}, + {"BufferSecurityCheck", "GS", "Buffer security check", "true", 0}, + {"BufferSecurityCheck", "GS-", "Turn off Buffer security check", "false", 0}, {"Detect64BitPortabilityProblems", "Wp64", - "Detect 64-bit Portability Problems", "TRUE", 0}, + "Detect 64-bit Portability Problems", "true", 0}, {"EnableFiberSafeOptimizations", "GT", "Enable Fiber-safe Optimizations", - "TRUE", 0}, + "true", 0}, {"EnableFunctionLevelLinking", "Gy", - "EnableFunctionLevelLinking", "TRUE", 0}, - {"EnableIntrinsicFunctions", "Oi", "EnableIntrinsicFunctions", "TRUE", 0}, - {"GlobalOptimizations", "Og", "Global Optimize", "TRUE", 0}, + "EnableFunctionLevelLinking", "true", 0}, + {"EnableIntrinsicFunctions", "Oi", "EnableIntrinsicFunctions", "true", 0}, + {"GlobalOptimizations", "Og", "Global Optimize", "true", 0}, {"ImproveFloatingPointConsistency", "Op", - "ImproveFloatingPointConsistency", "TRUE", 0}, - {"MinimalRebuild", "Gm", "minimal rebuild", "TRUE", 0}, - {"OmitFramePointers", "Oy", "OmitFramePointers", "TRUE", 0}, - {"OptimizeForWindowsApplication", "GA", "Optimize for windows", "TRUE", 0}, + "ImproveFloatingPointConsistency", "true", 0}, + {"MinimalRebuild", "Gm", "minimal rebuild", "true", 0}, + {"OmitFramePointers", "Oy", "OmitFramePointers", "true", 0}, + {"OptimizeForWindowsApplication", "GA", "Optimize for windows", "true", 0}, {"RuntimeTypeInfo", "GR", - "Turn on Run time type information for c++", "TRUE", 0}, + "Turn on Run time type information for c++", "true", 0}, {"RuntimeTypeInfo", "GR-", - "Turn off Run time type information for c++", "FALSE", 0}, - {"SmallerTypeCheck", "RTCc", "smaller type check", "TRUE", 0}, - {"SuppressStartupBanner", "nologo", "SuppressStartupBanner", "TRUE", 0}, + "Turn off Run time type information for c++", "false", 0}, + {"SmallerTypeCheck", "RTCc", "smaller type check", "true", 0}, + {"SuppressStartupBanner", "nologo", "SuppressStartupBanner", "true", 0}, {"WholeProgramOptimization", "GL", - "Enables whole program optimization", "TRUE", 0}, + "Enables whole program optimization", "true", 0}, {"WholeProgramOptimization", "GL-", - "Disables whole program optimization", "FALSE", 0}, - {"WarnAsError", "WX", "Treat warnings as errors", "TRUE", 0}, + "Disables whole program optimization", "false", 0}, + {"WarnAsError", "WX", "Treat warnings as errors", "true", 0}, {"BrowseInformation", "FR", "Generate browse information", "1", 0}, - {"StringPooling", "GF", "Enable StringPooling", "TRUE", 0}, + {"StringPooling", "GF", "Enable StringPooling", "true", 0}, {0,0,0,0,0} }; @@ -523,8 +523,8 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] = { // option flags (some flags map to the same option) {"GenerateManifest", "MANIFEST:NO", - "disable manifest generation", "FALSE", 0}, - {"GenerateManifest", "MANIFEST", "enable manifest generation", "TRUE", 0}, + "disable manifest generation", "false", 0}, + {"GenerateManifest", "MANIFEST", "enable manifest generation", "true", 0}, {"LinkIncremental", "INCREMENTAL:NO", "link incremental", "1", 0}, {"LinkIncremental", "INCREMENTAL:YES", "link incremental", "2", 0}, {"CLRUnmanagedCodeCheck", "CLRUNMANAGEDCODECHECK:NO", "", "false", 0}, @@ -540,7 +540,7 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] = {"IgnoreDefaultLibraryNames", "NODEFAULTLIB:", "default libs to ignore", "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable}, {"IgnoreAllDefaultLibraries", "NODEFAULTLIB", "ignore all default libs", - "TRUE", 0}, + "true", 0}, {"FixedBaseAddress", "FIXED:NO", "Generate a relocation section", "1", 0}, {"FixedBaseAddress", "FIXED", "Image must be loaded at a fixed address", "2", 0}, @@ -579,7 +579,7 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] = "No assembly even if CLR information is present in objects.", "true", 0}, {"ModuleDefinitionFile", "DEF:", "add an export def file", "", cmVS7FlagTable::UserValue}, - {"GenerateMapFile", "MAP", "enable generation of map file", "TRUE", 0}, + {"GenerateMapFile", "MAP", "enable generation of map file", "true", 0}, {0,0,0,0,0} }; @@ -780,7 +780,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, << "\"\n" << "\t\t\tConfigurationType=\"" << configType << "\"\n" << "\t\t\tUseOfMFC=\"" << mfcFlag << "\"\n" - << "\t\t\tATLMinimizesCRunTimeLibraryUsage=\"FALSE\"\n"; + << "\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\n"; // If unicode is enabled change the character set to unicode, if not // then default to MBCS. @@ -882,7 +882,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, fout << ipath << ";"; } fout << "\"\n"; - fout << "\t\t\t\tMkTypLibCompatible=\"FALSE\"\n"; + fout << "\t\t\t\tMkTypLibCompatible=\"false\"\n"; if( this->PlatformName == "x64" ) { fout << "\t\t\t\tTargetEnvironment=\"3\"\n"; @@ -895,7 +895,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, { fout << "\t\t\t\tTargetEnvironment=\"1\"\n"; } - fout << "\t\t\t\tGenerateStublessProxies=\"TRUE\"\n"; + fout << "\t\t\t\tGenerateStublessProxies=\"true\"\n"; fout << "\t\t\t\tTypeLibraryName=\"$(InputName).tlb\"\n"; fout << "\t\t\t\tOutputDirectory=\"$(IntDir)\"\n"; fout << "\t\t\t\tHeaderFileName=\"$(InputName).h\"\n"; @@ -1117,7 +1117,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n"; if(targetOptions.IsDebug()) { - fout << "\t\t\t\tGenerateDebugInformation=\"TRUE\"\n"; + fout << "\t\t\t\tGenerateDebugInformation=\"true\"\n"; } if(this->WindowsCEProject) { @@ -1215,7 +1215,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, << "\"\n"; if(targetOptions.IsDebug()) { - fout << "\t\t\t\tGenerateDebugInformation=\"TRUE\"\n"; + fout << "\t\t\t\tGenerateDebugInformation=\"true\"\n"; } if ( this->WindowsCEProject ) { |