Commit 3106cf4e authored by Brad King's avatar Brad King
Browse files

include_external_msproject: Restore support for EXCLUDE_FROM_ALL

In commit dc688857 (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 b99129d2 (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
parent 6ebe40c6
......@@ -85,10 +85,12 @@ bool cmIncludeExternalMSProjectCommand::InitialPass(
// Create a target instance for this utility.
cmTarget* target = this->Makefile->AddNewTarget(cmStateEnums::UTILITY,
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());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment