You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
325 B

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