Просмотр исходного кода

VS: Propagate CMAKE_VS_GLOBALS into custom targets

Issue: #19708
Alexander Boczar 6 лет назад
Родитель
Сommit
e7d57bc3c3
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 1
      Help/release/dev/vs-vctargetspath.rst
  2. 1 2
      Source/cmTarget.cxx

+ 2 - 1
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.

+ 1 - 2
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