diff options
author | Asit Dhal <dhal.asitk@gmail.com> | 2020-12-13 08:45:11 (GMT) |
---|---|---|
committer | Asit Dhal <dhal.asitk@gmail.com> | 2020-12-13 08:45:11 (GMT) |
commit | 6d0712c225013161abe1c491db13726cbd90f9ec (patch) | |
tree | 6ff5f013acaabc2eb3fb55e8f134a784e2333348 /Tests/RunCMake/File_Configure/AtOnly.cmake | |
parent | 4621ffb0285b32898fa7b8ddd8380d39c597642c (diff) | |
download | CMake-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.cmake | 12 |
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() |