CMake/Tests/RunCMake/AndroidTestUtilities/check.cmake
Brad King 5fc5f4d26e add_test: Revert "Allow special characters in test name"
Revert commit f84af8e270 (add_test: Allow special characters in test
name, 2020-05-16, v3.18.0-rc1~142^2).  Unfortunately the fix breaks
projects that were working around the limitation with manual escaping.
The fix can be re-introduced with a policy in a future version.

Also add a 3.18.1 release note explaining the change.

Fixes: #21017, #20965
Issue: #19391
2020-07-28 08:04:11 +10:00

21 lines
700 B
CMake

function(compare_build_to_expected)
cmake_parse_arguments(_comp "" "" "FILES" ${ARGN})
set(missing)
foreach(file ${_comp_FILES})
if(NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/${file}")
list(APPEND missing "${file}")
endif()
endforeach()
if(missing)
string(APPEND RunCMake_TEST_FAILED "Missing files:\n ${missing}")
set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
endif()
endfunction()
function(check_for_setup_test)
file(STRINGS "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" output_var REGEX "add_test\\(setup_test.*")
if(NOT output_var)
set(RunCMake_TEST_FAILED "Could not find the test: setup_test" PARENT_SCOPE)
endif()
endfunction()