summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2018-11-06 16:27:03 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2018-11-19 22:02:06 (GMT)
commitb5f8113ca7796df47bcb04bcd77991885c3b1b07 (patch)
tree60304b3a34939b475a4314dd6dce11f34e2922f7 /Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
parent1dc85a6652bc8255ff7a9ef39028a7df45e3007b (diff)
downloadCMake-b5f8113ca7796df47bcb04bcd77991885c3b1b07.zip
CMake-b5f8113ca7796df47bcb04bcd77991885c3b1b07.tar.gz
CMake-b5f8113ca7796df47bcb04bcd77991885c3b1b07.tar.bz2
Genex: Add policy to handle empty list items in $<IN_LIST:...>
The old behavior of $<IN_LIST:...> is inconsistent with that of if(IN_LIST), in that it does not find an empty search item even if the list contains empty items. This change adds a new policy to correctly handle empty items and make the behavior more consistent with if(IN_LIST). Fixes: #18556
Diffstat (limited to 'Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
index 3905c5f..013117e 100644
--- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake
@@ -61,3 +61,13 @@ if(LINKER_SUPPORTS_PDB)
else()
run_cmake(NonValidCompiler-TARGET_PDB_FILE)
endif()
+
+set(RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0085:STRING=OLD)
+run_cmake(CMP0085-OLD)
+unset(RunCMake_TEST_OPTIONS)
+
+run_cmake(CMP0085-WARN)
+
+set(RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0085:STRING=NEW)
+run_cmake(CMP0085-NEW)
+unset(RunCMake_TEST_OPTIONS)