diff options
author | Brad King <brad.king@kitware.com> | 2021-09-10 13:33:44 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-09-10 13:34:17 (GMT) |
commit | 293070c325ec4cb91668dbe75dd259b7dfb0aa7d (patch) | |
tree | 7db865e54cf7bcc1d714a60fd8476736bf7a835b /Tests/RunCMake | |
parent | 595502c03992a185678ffeaca7c73ee21426f53d (diff) | |
parent | f21158cdfe8a1938401f86b85b1ae1239372115b (diff) | |
download | CMake-293070c325ec4cb91668dbe75dd259b7dfb0aa7d.zip CMake-293070c325ec4cb91668dbe75dd259b7dfb0aa7d.tar.gz CMake-293070c325ec4cb91668dbe75dd259b7dfb0aa7d.tar.bz2 |
Merge topic 'vs_settings'
f21158cdfe VS: Honor VS_SETTINGS source file property on all sources
3bf013632d cmVisualStudio10TargetGenerator: Factor out helper to write VS_SETTINGS
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6492
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/VS10Project/VsSettings-check.cmake | 15 | ||||
-rw-r--r-- | Tests/RunCMake/VS10Project/VsSettings.cmake | 2 |
2 files changed, 14 insertions, 3 deletions
diff --git a/Tests/RunCMake/VS10Project/VsSettings-check.cmake b/Tests/RunCMake/VS10Project/VsSettings-check.cmake index 0f8b26c..13cc8e2 100644 --- a/Tests/RunCMake/VS10Project/VsSettings-check.cmake +++ b/Tests/RunCMake/VS10Project/VsSettings-check.cmake @@ -4,20 +4,29 @@ macro(ensure_props_set projectFile) return() endif() - set(SettingFound FALSE) + set(Setting1Found FALSE) + set(Setting2Found FALSE) file(STRINGS "${projectFile}" lines) foreach(line IN LISTS lines) if(line MATCHES "<SourceProperty1.*Debug.*>SourceProperty1Value</SourceProperty1>") message("SourceProperty1 setting found") - set(SettingFound TRUE) + set(Setting1Found TRUE) + endif() + if(line MATCHES "<SourceProperty2.*Debug.*>SourceProperty2Value</SourceProperty2>") + message("SourceProperty2 setting found") + set(Setting2Found TRUE) endif() endforeach() - if (NOT SettingFound) + if (NOT Setting1Found) set(RunCMake_TEST_FAILED "SourceProperty1 setting was not found") return() endif() + if (NOT Setting2Found) + set(RunCMake_TEST_FAILED "SourceProperty2 setting was not found") + return() + endif() endmacro() ensure_props_set("${RunCMake_TEST_BINARY_DIR}/foo.vcxproj") diff --git a/Tests/RunCMake/VS10Project/VsSettings.cmake b/Tests/RunCMake/VS10Project/VsSettings.cmake index a4b321b..3a046f1 100644 --- a/Tests/RunCMake/VS10Project/VsSettings.cmake +++ b/Tests/RunCMake/VS10Project/VsSettings.cmake @@ -3,3 +3,5 @@ enable_language(CXX) add_library(foo foo.cpp shader.hlsl) set_property(SOURCE shader.hlsl PROPERTY VS_SETTINGS "$<$<CONFIG:DEBUG>:SourceProperty1=SourceProperty1Value>") +set_property(SOURCE foo.cpp PROPERTY VS_SETTINGS + "$<$<CONFIG:DEBUG>:SourceProperty2=SourceProperty2Value>") |