diff options
author | Brad King <brad.king@kitware.com> | 2014-06-05 17:18:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-06-09 15:00:01 (GMT) |
commit | 808f4b1fa4c13f9b412520f4bd2aebeaff95ccda (patch) | |
tree | 4263bd03d639e33d695c737d216e1c253ac43bef /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 13e6d5595f4f076073e1522286f20f1a6733ad3e (diff) | |
download | CMake-808f4b1fa4c13f9b412520f4bd2aebeaff95ccda.zip CMake-808f4b1fa4c13f9b412520f4bd2aebeaff95ccda.tar.gz CMake-808f4b1fa4c13f9b412520f4bd2aebeaff95ccda.tar.bz2 |
VS: Re-order logic to group MS-tool-specific options together
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index c2c143d..06c0825 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1445,6 +1445,10 @@ void cmVisualStudio10TargetGenerator::WriteClOptions( clOptions.OutputAdditionalOptions(*this->BuildFileStream, " ", ""); this->OutputIncludes(includes); clOptions.OutputFlagMap(*this->BuildFileStream, " "); + clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", + "\n", "CXX"); + + this->WriteString("<ObjectFileName>$(IntDir)</ObjectFileName>\n", 3); // If not in debug mode, write the DebugInformationFormat field // without value so PDBs don't get generated uselessly. @@ -1454,10 +1458,6 @@ void cmVisualStudio10TargetGenerator::WriteClOptions( "</DebugInformationFormat>\n", 3); } - clOptions.OutputPreprocessorDefinitions(*this->BuildFileStream, " ", - "\n", "CXX"); - this->WriteString("<ObjectFileName>$(IntDir)</ObjectFileName>\n", 3); - // Specify the compiler program database file if configured. std::string pdb = this->Target->GetCompilePDBPath(configName.c_str()); if(!pdb.empty()) @@ -1600,14 +1600,6 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) flags += " "; flags += flagsConfig; } - if ( this->Target->GetPropertyAsBool("WIN32_EXECUTABLE") ) - { - linkOptions.AddFlag("SubSystem", "Windows"); - } - else - { - linkOptions.AddFlag("SubSystem", "Console"); - } std::string standardLibsVar = "CMAKE_"; standardLibsVar += linkLanguage; standardLibsVar += "_STANDARD_LIBRARIES"; @@ -1661,22 +1653,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkDirs += "%(AdditionalLibraryDirectories)"; linkOptions.AddFlag("AdditionalLibraryDirectories", linkDirs.c_str()); linkOptions.AddFlag("AdditionalDependencies", libs.c_str()); - linkOptions.AddFlag("Version", ""); - - if(const char* stackVal = - this->Makefile->GetDefinition("CMAKE_"+linkLanguage+"_STACK_SIZE")) - { - linkOptions.AddFlag("StackReserveSize", stackVal); - } - if(linkOptions.IsDebug() || flags.find("/debug") != flags.npos) - { - linkOptions.AddFlag("GenerateDebugInformation", "true"); - } - else - { - linkOptions.AddFlag("GenerateDebugInformation", "false"); - } std::string targetName; std::string targetNameSO; std::string targetNameFull; @@ -1695,6 +1672,31 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) config.c_str()); } + linkOptions.AddFlag("Version", ""); + + if ( this->Target->GetPropertyAsBool("WIN32_EXECUTABLE") ) + { + linkOptions.AddFlag("SubSystem", "Windows"); + } + else + { + linkOptions.AddFlag("SubSystem", "Console"); + } + + if(const char* stackVal = + this->Makefile->GetDefinition("CMAKE_"+linkLanguage+"_STACK_SIZE")) + { + linkOptions.AddFlag("StackReserveSize", stackVal); + } + + if(linkOptions.IsDebug() || flags.find("/debug") != flags.npos) + { + linkOptions.AddFlag("GenerateDebugInformation", "true"); + } + else + { + linkOptions.AddFlag("GenerateDebugInformation", "false"); + } std::string pdb = this->Target->GetPDBDirectory(config.c_str()); pdb += "/"; pdb += targetNamePDB; |