summaryrefslogtreecommitdiffstats
path: root/Source/cmExportBuildFileGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-09-23 11:45:17 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-01-05 00:18:37 (GMT)
commit894f52f32d96ae92df0ba3dac2a70fe9c87e818d (patch)
treeac4350fb4cea5b188f7880ea4207d4a4fecbdf7e /Source/cmExportBuildFileGenerator.cxx
parentf5b1980fb27fa902d37856ec3e22daddfeb9d52f (diff)
downloadCMake-894f52f32d96ae92df0ba3dac2a70fe9c87e818d.zip
CMake-894f52f32d96ae92df0ba3dac2a70fe9c87e818d.tar.gz
CMake-894f52f32d96ae92df0ba3dac2a70fe9c87e818d.tar.bz2
Handle INTERFACE properties transitively for includes and defines.
Contextually, the behavior is as if the properties content from another target is included in the string and then the result is evaluated.
Diffstat (limited to 'Source/cmExportBuildFileGenerator.cxx')
-rw-r--r--Source/cmExportBuildFileGenerator.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index 3e9a9fd..9533319 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -52,6 +52,8 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
this->GenerateExpectedTargetsCode(os, expectedTargets);
}
+ std::vector<std::string> missingTargets;
+
// Create all the imported targets.
for(std::vector<cmTarget*>::const_iterator
tei = allTargets.begin();
@@ -59,8 +61,21 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
{
cmTarget* te = *tei;
this->GenerateImportTargetCode(os, te);
+
+ ImportPropertyMap properties;
+
+ this->PopulateInterfaceProperty("INTERFACE_INCLUDE_DIRECTORIES", te,
+ cmGeneratorExpression::BuildInterface,
+ properties, missingTargets);
+ this->PopulateInterfaceProperty("INTERFACE_COMPILE_DEFINITIONS", te,
+ cmGeneratorExpression::BuildInterface,
+ properties, missingTargets);
+
+ this->GenerateInterfaceProperties(te, os, properties);
}
+ this->GenerateMissingTargetsCheckCode(os, missingTargets);
+
// Generate import file content for each configuration.
for(std::vector<std::string>::const_iterator
ci = this->Configurations.begin();