cmake/Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake

14 lines
441 B
CMake
Raw Normal View History

2018-01-26 17:06:56 +01:00
foreach(f
"${RunCMake_TEST_BINARY_DIR}/relative-input-WARN.txt"
"${RunCMake_TEST_BINARY_DIR}/relative-output-WARN.txt"
)
if(EXISTS "${f}")
file(READ "${f}" content)
if(NOT content MATCHES "^relative-input-WARN[\r\n]*$")
2023-07-02 19:51:09 +02:00
string(APPEND RunCMake_TEST_FAILED "File\n ${f}\n" "does not have expected content.\n")
2018-01-26 17:06:56 +01:00
endif()
else()
string(APPEND RunCMake_TEST_FAILED "Missing\n ${f}\n")
endif()
endforeach()