diff options
author | Brad King <brad.king@kitware.com> | 2018-02-14 16:15:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-02-14 16:24:05 (GMT) |
commit | b6d68766b1a8537a3a130a38aa91936e579da6fd (patch) | |
tree | 47374c4b658c68013502208c72a7410b99ab6dfc /Source/cmExportBuildAndroidMKGenerator.cxx | |
parent | 56e1688517ab040cf9554926070830df475980b3 (diff) | |
download | CMake-b6d68766b1a8537a3a130a38aa91936e579da6fd.zip CMake-b6d68766b1a8537a3a130a38aa91936e579da6fd.tar.gz CMake-b6d68766b1a8537a3a130a38aa91936e579da6fd.tar.bz2 |
Android.mk: Fix export of static libraries with PRIVATE dependencies
The `LINK_ONLY` generator expression is used to represent private
dependencies of static libraries in their `INTERFACE_LINK_LIBRARIES`
property value. Fix evaluation of generator expressions during export
to support the `LINK_ONLY` genex. Extend the RunCMake.AndroidMK test
with a case for this.
Diffstat (limited to 'Source/cmExportBuildAndroidMKGenerator.cxx')
-rw-r--r-- | Source/cmExportBuildAndroidMKGenerator.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmExportBuildAndroidMKGenerator.cxx b/Source/cmExportBuildAndroidMKGenerator.cxx index 5bfae1e..817b5d9 100644 --- a/Source/cmExportBuildAndroidMKGenerator.cxx +++ b/Source/cmExportBuildAndroidMKGenerator.cxx @@ -8,6 +8,7 @@ #include <utility> #include "cmGeneratorExpression.h" +#include "cmGeneratorExpressionDAGChecker.h" #include "cmGeneratorTarget.h" #include "cmLinkItem.h" #include "cmLocalGenerator.h" @@ -104,10 +105,12 @@ void cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties( // evaluate any generator expressions with the current // build type of the makefile cmGeneratorExpression ge; + cmGeneratorExpressionDAGChecker dagChecker( + target->GetName(), "INTERFACE_LINK_LIBRARIES", nullptr, nullptr); std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(property.second); - std::string evaluated = - cge->Evaluate(target->GetLocalGenerator(), config); + std::string evaluated = cge->Evaluate( + target->GetLocalGenerator(), config, false, target, &dagChecker); // need to look at list in pi->second and see if static or shared // FindTargetToLink // target->GetLocalGenerator()->FindGeneratorTargetToUse() |