summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/File_Configure/AtOnly.cmake
diff options
context:
space:
mode:
authorAsit Dhal <dhal.asitk@gmail.com>2020-12-13 08:45:11 (GMT)
committerAsit Dhal <dhal.asitk@gmail.com>2020-12-13 08:45:11 (GMT)
commit6d0712c225013161abe1c491db13726cbd90f9ec (patch)
tree6ff5f013acaabc2eb3fb55e8f134a784e2333348 /Tests/RunCMake/File_Configure/AtOnly.cmake
parent4621ffb0285b32898fa7b8ddd8380d39c597642c (diff)
downloadCMake-6d0712c225013161abe1c491db13726cbd90f9ec.zip
CMake-6d0712c225013161abe1c491db13726cbd90f9ec.tar.gz
CMake-6d0712c225013161abe1c491db13726cbd90f9ec.tar.bz2
file(configure): Order of named options should be specified in any order
Fixes: #20915
Diffstat (limited to 'Tests/RunCMake/File_Configure/AtOnly.cmake')
-rw-r--r--Tests/RunCMake/File_Configure/AtOnly.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/File_Configure/AtOnly.cmake b/Tests/RunCMake/File_Configure/AtOnly.cmake
new file mode 100644
index 0000000..cc5304a
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/AtOnly.cmake
@@ -0,0 +1,12 @@
+set(file_name ${CMAKE_CURRENT_BINARY_DIR}/atonly.txt)
+set(var_a "a")
+set(var_b "b")
+file(CONFIGURE
+ OUTPUT ${file_name}
+ CONTENT "-->@var_a@<-- -->${var_b}<--"
+ @ONLY
+)
+file(READ ${file_name} file_content)
+if(NOT file_content STREQUAL "-->a<-- -->${var_b}<--")
+ message(FATAL_ERROR "@ONLY doesn't work")
+endif()