diff options
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() |