Add a "CMakeCommands.find_package" test to run CMake on a bunch of cases in which find_package fails. Check that the process return code and warning/error messages are as expected. Record expected test output in corresponding files for reference by the check. These files will also serve as a reference for the message text in each case.
12 lines
378 B
CMake
12 lines
378 B
CMake
macro(add_CMakeCommands_test test)
|
|
add_test(CMakeCommands.${test} ${CMAKE_CMAKE_COMMAND}
|
|
-DCMake_SOURCE_DIR=${CMake_SOURCE_DIR} # TODO: Remove
|
|
-Ddir=${CMAKE_CURRENT_BINARY_DIR}/${test}
|
|
-Dgen=${CMAKE_TEST_GENERATOR}
|
|
-P "${CMAKE_CURRENT_SOURCE_DIR}/${test}/test.cmake"
|
|
)
|
|
endmacro()
|
|
|
|
add_CMakeCommands_test(build_command)
|
|
add_CMakeCommands_test(find_package)
|