diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-06 22:44:06 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-08 22:00:18 (GMT) |
commit | e46ef270ed7c96586ed755322174791374241574 (patch) | |
tree | f222837a88fa3c220171d3e7e4715943729ef5aa /Source/cmExportFileGenerator.cxx | |
parent | 53d3a1c95a4b03b327149e628f6937d68af938e6 (diff) | |
download | CMake-e46ef270ed7c96586ed755322174791374241574.zip CMake-e46ef270ed7c96586ed755322174791374241574.tar.gz CMake-e46ef270ed7c96586ed755322174791374241574.tar.bz2 |
export: Port internal method to cmGeneratorTarget.
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 881acee..2a9b72c 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -241,12 +241,12 @@ static bool isSubDirectory(const char* a, const char* b) //---------------------------------------------------------------------------- static bool checkInterfaceDirs(const std::string &prepro, - cmTarget *target, const std::string& prop) + cmGeneratorTarget *target, const std::string& prop) { const char* installDir = - target->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_PREFIX"); - const char* topSourceDir = target->GetMakefile()->GetHomeDirectory(); - const char* topBinaryDir = target->GetMakefile()->GetHomeOutputDirectory(); + target->Makefile->GetSafeDefinition("CMAKE_INSTALL_PREFIX"); + const char* topSourceDir = target->Makefile->GetHomeDirectory(); + const char* topBinaryDir = target->Makefile->GetHomeOutputDirectory(); std::vector<std::string> parts; cmGeneratorExpression::Split(prepro, parts); @@ -269,7 +269,7 @@ static bool checkInterfaceDirs(const std::string &prepro, { if (prop == "INTERFACE_INCLUDE_DIRECTORIES") { - switch (target->GetPolicyStatusCMP0041()) + switch (target->Target->GetPolicyStatusCMP0041()) { case cmPolicies::WARN: messageType = cmake::WARNING; @@ -298,7 +298,7 @@ static bool checkInterfaceDirs(const std::string &prepro, e << "Target \"" << target->GetName() << "\" " << prop << " property contains relative path:\n" " \"" << *li << "\""; - target->GetMakefile()->IssueMessage(messageType, e.str()); + target->GetLocalGenerator()->IssueMessage(messageType, e.str()); } bool inBinary = isSubDirectory(li->c_str(), topBinaryDir); bool inSource = isSubDirectory(li->c_str(), topSourceDir); @@ -316,7 +316,7 @@ static bool checkInterfaceDirs(const std::string &prepro, { if (!shouldContinue) { - switch(target->GetPolicyStatusCMP0052()) + switch(target->Target->GetPolicyStatusCMP0052()) { case cmPolicies::WARN: { @@ -329,7 +329,7 @@ static bool checkInterfaceDirs(const std::string &prepro, "a subdirectory of the " << (inBinary ? "build" : "source") << " tree:\n \"" << (inBinary ? topBinaryDir : topSourceDir) << "\"" << std::endl; - target->GetMakefile()->IssueMessage(cmake::AUTHOR_WARNING, + target->GetLocalGenerator()->IssueMessage(cmake::AUTHOR_WARNING, s.str()); } case cmPolicies::OLD: @@ -352,7 +352,7 @@ static bool checkInterfaceDirs(const std::string &prepro, e << "Target \"" << target->GetName() << "\" " << prop << " property contains path:\n" " \"" << *li << "\"\nwhich is prefixed in the build directory."; - target->GetMakefile()->IssueMessage(messageType, e.str()); + target->GetLocalGenerator()->IssueMessage(messageType, e.str()); } if (!inSourceBuild) { @@ -361,7 +361,7 @@ static bool checkInterfaceDirs(const std::string &prepro, e << "Target \"" << target->GetName() << "\" " << prop << " property contains path:\n" " \"" << *li << "\"\nwhich is prefixed in the source directory."; - target->GetMakefile()->IssueMessage(messageType, e.str()); + target->GetLocalGenerator()->IssueMessage(messageType, e.str()); } } } @@ -421,7 +421,9 @@ void cmExportFileGenerator::PopulateSourcesInterface( this->ResolveTargetsInGeneratorExpressions(prepro, target, missingTargets); - if (!checkInterfaceDirs(prepro, target, propName)) + cmGeneratorTarget* gt = target->GetMakefile() + ->GetGlobalGenerator()->GetGeneratorTarget(target); + if (!checkInterfaceDirs(prepro, gt, propName)) { return; } @@ -491,7 +493,7 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface( this->ResolveTargetsInGeneratorExpressions(prepro, target->Target, missingTargets); - if (!checkInterfaceDirs(prepro, target->Target, propName)) + if (!checkInterfaceDirs(prepro, target, propName)) { return; } |