diff options
author | Brad King <brad.king@kitware.com> | 2005-11-18 15:36:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-11-18 15:36:52 (GMT) |
commit | 036a78056c4a0ba82ccb01438597f6847b681011 (patch) | |
tree | ce1895da685d3d923ec1b11d3f7b7dd20a8edc57 /Source/cmLocalVisualStudio7Generator.cxx | |
parent | a9c2ff474ed61a2ee0224b9f6bd735e9d41323ae (diff) | |
download | CMake-036a78056c4a0ba82ccb01438597f6847b681011.zip CMake-036a78056c4a0ba82ccb01438597f6847b681011.tar.gz CMake-036a78056c4a0ba82ccb01438597f6847b681011.tar.bz2 |
BUG: Fixed flag-to-vcproj-attribute conversion code to work again (it was broken by the optimization changes). Added conversion of /nologo flag to SuppressStartupBanner attribute and /Gy flag to EnableFunctionLevelLinking attribute.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index fb307d7..d038040 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -254,6 +254,7 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] = // boolean flags {"BufferSecurityCheck", "GS", "Buffer security check", "TRUE"}, {"EnableFibreSafeOptimization", "GT", "OmitFramePointers", "TRUE"}, + {"EnableFunctionLevelLinking", "Gy", "EnableFunctionLevelLinking", "TRUE"}, {"EnableIntrinsicFunctions", "Oi", "EnableIntrinsicFunctions", "TRUE"}, {"ExceptionHandling", "EHsc", "enable c++ exceptions", "TRUE"}, {"ExceptionHandling", "GX", "enable c++ exceptions", "TRUE"}, @@ -264,6 +265,7 @@ cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] = {"OptimizeForWindowsApplication", "GA", "Optimize for windows", "TRUE"}, {"RuntimeTypeInfo", "GR", "Turn on Run time type information for c++", "TRUE"}, {"SmallerTypeCheck", "RTCc", "smaller type check", "TRUE"}, + {"SuppressStartupBanner", "nologo", "SuppressStartupBanner", "TRUE"}, {"WarnAsError", "WX", "Treat warnings as errors", "TRUE"}, {0,0,0,0 } }; @@ -513,11 +515,6 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, fout << "\"\n"; fout << "\t\t\t\tAssemblerListingLocation=\"" << configName << "\"\n"; fout << "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n"; - if(m_Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) - { - fout << "\t\t\t\tSuppressStartupBanner=\"FALSE\"\n"; - } - if(programDatabase.size()) { fout << programDatabase << "\n"; @@ -551,8 +548,9 @@ void cmLocalVisualStudio7Generator::FillFlagMapFromCommandFlags( std::string option; while(flagTable->IDEName) { - option.reserve(strlen(flagTable->commandFlag+2)); + option.reserve(strlen(flagTable->commandFlag)+2); // first do the - version + option.clear(); option.insert(static_cast<std::string::size_type>(0), static_cast<std::string::size_type>(1), '-'); @@ -576,6 +574,18 @@ void cmLocalVisualStudio7Generator::FillFlagMapFromCommandFlags( // move to next flag flagTable++; } + + // If verbose makefiles have been requested and the /nologo option + // was not given explicitly in the flags we want to add an attribute + // to the generated project to disable logo suppression. Otherwise + // the GUI default is to enable suppression. + if(m_Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) + { + if(flagMap.find("SuppressStartupBanner") == flagMap.end()) + { + flagMap["SuppressStartupBanner"] = "FALSE"; + } + } } @@ -663,16 +673,6 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, { fout << "\t\t\t\t" << i->first << "=\"" << i->second << "\"\n"; } - - if(m_Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) - { - fout << "\t\t\t\tSuppressStartupBanner=\"FALSE\"\n"; - } - else - { - fout << "\t\t\t\tSuppressStartupBanner=\"TRUE\"\n"; - } - fout << "\t\t\t\tAdditionalLibraryDirectories=\""; this->OutputLibraryDirectories(fout, configName, libName, target); fout << "\"\n"; @@ -751,15 +751,6 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, { fout << "\t\t\t\t" << i->first << "=\"" << i->second << "\"\n"; } - if(m_Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) - { - fout << "\t\t\t\tSuppressStartupBanner=\"FALSE\"\n"; - } - else - { - fout << "\t\t\t\tSuppressStartupBanner=\"TRUE\"\n"; - } - fout << "\t\t\t\tAdditionalLibraryDirectories=\""; this->OutputLibraryDirectories(fout, configName, libName, target); fout << "\"\n"; |