diff options
author | Brad King <brad.king@kitware.com> | 2019-02-26 15:10:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-26 15:20:01 (GMT) |
commit | 3106cf4e3d15e0b6320ea3528079dd807f8bc06f (patch) | |
tree | e67fe7eca562132d3d0f6a22e102905594e8cbe0 /Source/cmIncludeExternalMSProjectCommand.cxx | |
parent | 6ebe40c6ae736157c2cd036ee01b771ae399b11d (diff) | |
download | CMake-3106cf4e3d15e0b6320ea3528079dd807f8bc06f.zip CMake-3106cf4e3d15e0b6320ea3528079dd807f8bc06f.tar.gz CMake-3106cf4e3d15e0b6320ea3528079dd807f8bc06f.tar.bz2 |
include_external_msproject: Restore support for EXCLUDE_FROM_ALL
In commit dc6888573d (Pass EXCLUDE_FROM_ALL from directory to targets,
2019-01-15, v3.14.0-rc1~83^2) all `AddNewTarget` call sites were updated
to copy the directory-level `EXCLUDE_FROM_ALL` into the target property
of the same name, except that the one for `include_external_msproject`
was incorrectly missed. Add it now.
Furthermore, refactoring in commit b99129d2d8 (ENH: some code cleanup,
2007-03-12, v2.6.0~2020) accidentally set the `EXCLUDE_FROM_ALL` target
property of `include_external_msproject`-generated targets to `FALSE`
instead of simply leaving it unset. This was not necessary but had no
effect until the above commit gave it a meaning. Drop that.
Fixes: #18986
Diffstat (limited to 'Source/cmIncludeExternalMSProjectCommand.cxx')
-rw-r--r-- | Source/cmIncludeExternalMSProjectCommand.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx index b224d09..93134ad 100644 --- a/Source/cmIncludeExternalMSProjectCommand.cxx +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -85,10 +85,12 @@ bool cmIncludeExternalMSProjectCommand::InitialPass( // Create a target instance for this utility. cmTarget* target = this->Makefile->AddNewTarget(cmStateEnums::UTILITY, utility_name.c_str()); + if (this->Makefile->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { + target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); + } target->SetProperty("GENERATOR_FILE_NAME", utility_name.c_str()); target->SetProperty("EXTERNAL_MSPROJECT", path.c_str()); - target->SetProperty("EXCLUDE_FROM_ALL", "FALSE"); if (!customType.empty()) target->SetProperty("VS_PROJECT_TYPE", customType.c_str()); |