From e7d57bc3c35e7c47746caf91591ef748b9ce3012 Mon Sep 17 00:00:00 2001 From: Alexander Boczar Date: Mon, 16 Sep 2019 16:55:26 -0700 Subject: VS: Propagate CMAKE_VS_GLOBALS into custom targets Issue: #19708 --- Help/release/dev/vs-vctargetspath.rst | 3 ++- Source/cmTarget.cxx | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Help/release/dev/vs-vctargetspath.rst b/Help/release/dev/vs-vctargetspath.rst index 462d183..d40af34 100644 --- a/Help/release/dev/vs-vctargetspath.rst +++ b/Help/release/dev/vs-vctargetspath.rst @@ -6,4 +6,5 @@ vs-vctargetspath to specify the ``VCTargetsPath`` value for project files. * The :variable:`CMAKE_VS_GLOBALS` variable value now applies during - compiler identification. + compiler identification and in targets created by the + :command:`add_custom_target` command. diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 99c16f2..a4f904b 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -511,8 +511,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, initProp("DOTNET_TARGET_FRAMEWORK_VERSION"); } - if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY && - this->GetType() != cmStateEnums::UTILITY) { + if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY) { // check for "CMAKE_VS_GLOBALS" variable and set up target properties // if any -- cgit v0.12