summaryrefslogtreecommitdiffstats
path: root/Tests/CustomCommand/compare_options.cmake
diff options
context:
space:
mode:
authorEd Branch <brance@mail.utexas.edu>2017-01-14 02:01:17 (GMT)
committerEd Branch <brance@mail.utexas.edu>2017-01-14 02:02:16 (GMT)
commit7c8ab7ddc8944152a1344c43acbb8c57fa2d398a (patch)
treee74c16ab04cd0961e5ca032ba99c45087dbd0dec /Tests/CustomCommand/compare_options.cmake
parenteee51e24d2290771ad3dded566ef897243f21331 (diff)
downloadCMake-7c8ab7ddc8944152a1344c43acbb8c57fa2d398a.zip
CMake-7c8ab7ddc8944152a1344c43acbb8c57fa2d398a.tar.gz
CMake-7c8ab7ddc8944152a1344c43acbb8c57fa2d398a.tar.bz2
add_custom_{command,target}: Add COMMAND_EXPAND_LISTS option
This option allows lists generated by generator expressions to be expanded. Closes: #15935
Diffstat (limited to 'Tests/CustomCommand/compare_options.cmake')
-rw-r--r--Tests/CustomCommand/compare_options.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/CustomCommand/compare_options.cmake b/Tests/CustomCommand/compare_options.cmake
new file mode 100644
index 0000000..a32e579
--- /dev/null
+++ b/Tests/CustomCommand/compare_options.cmake
@@ -0,0 +1,14 @@
+set(range 1 2 3 4 5 6 7 8 9 10)
+set(aargs "")
+set(bargs "")
+foreach(n IN LISTS range)
+ set(aval "${A${n}ARG}")
+ set(bval "${B${n}ARG}")
+ if(aval OR bval)
+ list(APPEND aargs "\"${aval}\"")
+ list(APPEND bargs "\"${bval}\"")
+ endif()
+endforeach()
+if(NOT "${aargs}" STREQUAL "${bargs}")
+ message(FATAL_ERROR "COMPARE_OPTIONS: \n\t${aargs} != \n\t${bargs}")
+endif()