diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2021-05-24 17:40:25 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2021-05-24 17:56:59 (GMT) |
commit | 38f2562d5b159cdf7ce4340911c1adb30b3a003e (patch) | |
tree | 398a1cbb18c4d3ecb9ee6779070232d70dd441cb /Source | |
parent | fe9988add39e732cb8a725fe6f6bca72408ebcfd (diff) | |
download | CMake-38f2562d5b159cdf7ce4340911c1adb30b3a003e.zip CMake-38f2562d5b159cdf7ce4340911c1adb30b3a003e.tar.gz CMake-38f2562d5b159cdf7ce4340911c1adb30b3a003e.tar.bz2 |
CMP0082: Check EXCLUDE_FROM_ALL property at generate time
Fixes: #22234
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmInstallSubdirectoryGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmInstallSubdirectoryGenerator.h | 1 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmInstallSubdirectoryGenerator.cxx b/Source/cmInstallSubdirectoryGenerator.cxx index 76806e5..c333bca 100644 --- a/Source/cmInstallSubdirectoryGenerator.cxx +++ b/Source/cmInstallSubdirectoryGenerator.cxx @@ -14,10 +14,10 @@ #include "cmSystemTools.h" cmInstallSubdirectoryGenerator::cmInstallSubdirectoryGenerator( - cmMakefile* makefile, std::string binaryDirectory, bool excludeFromAll, + cmMakefile* makefile, std::string binaryDirectory, cmListFileBacktrace backtrace) : cmInstallGenerator("", std::vector<std::string>(), "", MessageDefault, - excludeFromAll, std::move(backtrace)) + false, std::move(backtrace)) , Makefile(makefile) , BinaryDirectory(std::move(binaryDirectory)) { @@ -52,7 +52,7 @@ bool cmInstallSubdirectoryGenerator::Compute(cmLocalGenerator* lg) void cmInstallSubdirectoryGenerator::GenerateScript(std::ostream& os) { - if (!this->ExcludeFromAll) { + if (!this->Makefile->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { cmPolicies::PolicyStatus status = this->LocalGenerator->GetPolicyStatus(cmPolicies::CMP0082); switch (status) { diff --git a/Source/cmInstallSubdirectoryGenerator.h b/Source/cmInstallSubdirectoryGenerator.h index 614cef9..f174d07 100644 --- a/Source/cmInstallSubdirectoryGenerator.h +++ b/Source/cmInstallSubdirectoryGenerator.h @@ -21,7 +21,6 @@ class cmInstallSubdirectoryGenerator : public cmInstallGenerator public: cmInstallSubdirectoryGenerator(cmMakefile* makefile, std::string binaryDirectory, - bool excludeFromAll, cmListFileBacktrace backtrace); ~cmInstallSubdirectoryGenerator() override; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 78cae0e..dd25406 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1844,7 +1844,7 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath, } this->AddInstallGenerator(cm::make_unique<cmInstallSubdirectoryGenerator>( - subMf, binPath, excludeFromAll, this->GetBacktrace())); + subMf, binPath, this->GetBacktrace())); } const std::string& cmMakefile::GetCurrentSourceDirectory() const |