diff options
author | Craig Scott <craig.scott@crascit.com> | 2020-07-14 22:59:30 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-14 22:59:39 (GMT) |
commit | a335999021faa8430a0e33ee70754ebb0c74b117 (patch) | |
tree | 9b640cba2125b78842343ad974c4085049453d6b /Tests | |
parent | 8c6cce27ca74d28e6370d1a424fc11c1d3686eb9 (diff) | |
parent | f6969b917d5d74c11207b977e7a8168f24b797dc (diff) | |
download | CMake-a335999021faa8430a0e33ee70754ebb0c74b117.zip CMake-a335999021faa8430a0e33ee70754ebb0c74b117.tar.gz CMake-a335999021faa8430a0e33ee70754ebb0c74b117.tar.bz2 |
Merge topic 'source_file_props_dedup_scopes' into release-3.18
f6969b917d set_property: Deduplicate source file directory scopes
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5009
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Properties/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/Properties/CMakeLists.txt b/Tests/Properties/CMakeLists.txt index 74d99fa..162a178 100644 --- a/Tests/Properties/CMakeLists.txt +++ b/Tests/Properties/CMakeLists.txt @@ -261,6 +261,25 @@ function(check_get_property_value expected) endif() endfunction() +# Check that source file directory scopes are deduplicated. +set_property(SOURCE "${CMAKE_CURRENT_BINARY_DIR}/src32.cpp" + DIRECTORY SubDir2 SubDir2 SubDir2 + TARGET_DIRECTORY set_prop_lib_3 set_prop_lib_3 set_prop_lib_3 + APPEND + PROPERTY NON_DUPLICATED_CUSTOM_PROP 1 +) + +get_property(actual + SOURCE "${CMAKE_CURRENT_BINARY_DIR}/src32.cpp" + DIRECTORY SubDir2 + PROPERTY NON_DUPLICATED_CUSTOM_PROP) +check_get_property_value("1") + +get_source_file_property(actual "${CMAKE_CURRENT_BINARY_DIR}/src32.cpp" + TARGET_DIRECTORY set_prop_lib_3 + NON_DUPLICATED_CUSTOM_PROP) +check_get_property_value("1") + # Get property + target directory get_property(actual SOURCE "${src_prefix}/src1.cpp" |