diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-10-15 08:42:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-10-17 20:24:14 (GMT) |
commit | 2a6bd96c1354484b4f9e71d11422f8da028c1622 (patch) | |
tree | c31212f22e9e5f0d05ab36b874f642d11f828c61 /Source/cmLocalVisualStudio6Generator.cxx | |
parent | 79edd00235091475d5b3f1305bcf991cad3e45f4 (diff) | |
download | CMake-2a6bd96c1354484b4f9e71d11422f8da028c1622.zip CMake-2a6bd96c1354484b4f9e71d11422f8da028c1622.tar.gz CMake-2a6bd96c1354484b4f9e71d11422f8da028c1622.tar.bz2 |
Fix config-specific INCLUDE_DIRECTORIES in multi-config generators
Commit 08cb4fa4 (Process generator expressions in the
INCLUDE_DIRECTORIES property, 2012-09-18) contained an incorrect
assumption that CMAKE_BUILD_TYPE was set on the makefile for each
generated configuration in multi-config generators. Fix that by making
the GetIncludeDirectories API depend on the config.
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio6Generator.cxx | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 72b56e7..f15322b 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -853,7 +853,8 @@ inline std::string removeQuotes(const std::string& s) std::string -cmLocalVisualStudio6Generator::GetTargetIncludeOptions(cmTarget &target) +cmLocalVisualStudio6Generator::GetTargetIncludeOptions(cmTarget &target, + const char *config) { std::string includeOptions; @@ -868,7 +869,7 @@ cmLocalVisualStudio6Generator::GetTargetIncludeOptions(cmTarget &target) for(int j=0; j < 2; ++j) { std::vector<std::string> includes; - this->GetIncludeDirectories(includes, gt); + this->GetIncludeDirectories(includes, gt, "C", config); std::vector<std::string>::iterator i; for(i = includes.begin(); i != includes.end(); ++i) @@ -1147,7 +1148,15 @@ void cmLocalVisualStudio6Generator #endif // Get include options for this target. - std::string includeOptions = this->GetTargetIncludeOptions(target); + std::string includeOptionsDebug = this->GetTargetIncludeOptions(target, + "DEBUG"); + std::string includeOptionsRelease = this->GetTargetIncludeOptions(target, + "RELEASE"); + std::string includeOptionsRelWithDebInfo = this->GetTargetIncludeOptions( + target, + "RELWITHDEBINFO"); + std::string includeOptionsMinSizeRel = this->GetTargetIncludeOptions(target, + "MINSIZEREL"); // Get extra linker options for this target type. std::string extraLinkOptions; @@ -1560,8 +1569,15 @@ void cmLocalVisualStudio6Generator cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELWITHDEBINFO", optionsRelWithDebInfo.c_str()); - cmSystemTools::ReplaceString(line, "BUILD_INCLUDES", - includeOptions.c_str()); + cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_DEBUG", + includeOptionsDebug.c_str()); + cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_RELEASE", + includeOptionsRelease.c_str()); + cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_MINSIZEREL", + includeOptionsMinSizeRel.c_str()); + cmSystemTools::ReplaceString(line, "BUILD_INCLUDES_RELWITHDEBINFO", + includeOptionsRelWithDebInfo.c_str()); + cmSystemTools::ReplaceString(line, "TARGET_VERSION_FLAG", targetVersionFlag.c_str()); cmSystemTools::ReplaceString(line, "TARGET_IMPLIB_FLAG_DEBUG", |