summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-10-15 08:42:42 (GMT)
committerBrad King <brad.king@kitware.com>2012-10-17 20:24:14 (GMT)
commit2a6bd96c1354484b4f9e71d11422f8da028c1622 (patch)
treec31212f22e9e5f0d05ab36b874f642d11f828c61 /Source/cmMakefileTargetGenerator.cxx
parent79edd00235091475d5b3f1305bcf991cad3e45f4 (diff)
downloadCMake-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/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 5cc67e2..3d02d6a 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1057,8 +1057,11 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
*this->InfoFileStream
<< "SET(CMAKE_C_TARGET_INCLUDE_PATH\n";
std::vector<std::string> includes;
+
+ const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
this->LocalGenerator->GetIncludeDirectories(includes,
- this->GeneratorTarget);
+ this->GeneratorTarget,
+ "C", config);
for(std::vector<std::string>::iterator i = includes.begin();
i != includes.end(); ++i)
{
@@ -1543,8 +1546,11 @@ std::string cmMakefileTargetGenerator::GetFrameworkFlags()
emitted.insert("/System/Library/Frameworks");
#endif
std::vector<std::string> includes;
+
+ const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
this->LocalGenerator->GetIncludeDirectories(includes,
- this->GeneratorTarget);
+ this->GeneratorTarget,
+ "C", config);
std::vector<std::string>::iterator i;
// check all include directories for frameworks as this
// will already have added a -F for the framework
@@ -1849,8 +1855,10 @@ void cmMakefileTargetGenerator::AddIncludeFlags(std::string& flags,
std::vector<std::string> includes;
+ const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
this->LocalGenerator->GetIncludeDirectories(includes,
- this->GeneratorTarget, lang);
+ this->GeneratorTarget,
+ lang, config);
std::string includeFlags =
this->LocalGenerator->GetIncludeFlags(includes, lang, useResponseFile);
@@ -1953,8 +1961,10 @@ void cmMakefileTargetGenerator::AddFortranFlags(std::string& flags)
this->Makefile->GetDefinition("CMAKE_Fortran_MODPATH_FLAG"))
{
std::vector<std::string> includes;
+ const char *config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE");
this->LocalGenerator->GetIncludeDirectories(includes,
- this->GeneratorTarget);
+ this->GeneratorTarget,
+ "C", config);
for(std::vector<std::string>::const_iterator idi = includes.begin();
idi != includes.end(); ++idi)
{