summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project
diff options
context:
space:
mode:
authorDaniel Eiband <daniel.eiband@brainlab.com>2019-08-26 13:22:43 (GMT)
committerDaniel Eiband <daniel.eiband@brainlab.com>2019-08-26 13:22:43 (GMT)
commit8909a450a6fb74447ef6dc49f16d747bae3c72ea (patch)
treeeaef1c39324a7a45a670bfd453f21ba2e9fc6151 /Tests/RunCMake/VS10Project
parent0d356e4c9490a104a02be657936132c080fc023b (diff)
downloadCMake-8909a450a6fb74447ef6dc49f16d747bae3c72ea.zip
CMake-8909a450a6fb74447ef6dc49f16d747bae3c72ea.tar.gz
CMake-8909a450a6fb74447ef6dc49f16d747bae3c72ea.tar.bz2
VS: Add support for generator expressions to VS_CONFIGURATION_TYPE
Generator expressions in target property VS_CONFIGURATION_TYPE might be used to set the ConfigurationType to Utility for certain configurations to not build the target while still linking to the target in other configurations. Fixes: #19613
Diffstat (limited to 'Tests/RunCMake/VS10Project')
-rw-r--r--Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake2
-rw-r--r--Tests/RunCMake/VS10Project/VsConfigurationType.cmake2
2 files changed, 2 insertions, 2 deletions
diff --git a/Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake b/Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake
index 4690970..bbd34da 100644
--- a/Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake
@@ -9,7 +9,7 @@ file(STRINGS "${vcProjectFile}" lines)
foreach(line IN LISTS lines)
if(line MATCHES "^ *<ConfigurationType>(.*)</ConfigurationType>$")
set(propertyFound TRUE)
- set(expectedValue "MyValue")
+ set(expectedValue "MyValue foo")
set(actualValue ${CMAKE_MATCH_1})
if(NOT (${actualValue} STREQUAL ${expectedValue}))
set(RunCMake_TEST_FAILED "ConfigurationType \"${actualValue}\" differs from expected value \"${expectedValue}\".")
diff --git a/Tests/RunCMake/VS10Project/VsConfigurationType.cmake b/Tests/RunCMake/VS10Project/VsConfigurationType.cmake
index a73dfe8..a2f544a 100644
--- a/Tests/RunCMake/VS10Project/VsConfigurationType.cmake
+++ b/Tests/RunCMake/VS10Project/VsConfigurationType.cmake
@@ -1,3 +1,3 @@
enable_language(CXX)
add_library(foo foo.cpp)
-set_target_properties(foo PROPERTIES VS_CONFIGURATION_TYPE "MyValue")
+set_target_properties(foo PROPERTIES VS_CONFIGURATION_TYPE "MyValue $<TARGET_PROPERTY:foo,NAME>")