summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/File_Configure/AtOnly.cmake
blob: cc5304a1f5d817cb88b71a76c541a4cb40e035fd (plain)
1
2
3
4
5
6
7
8
9
10
11
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()