From c3635e502c9804fc0ab781b9f20e07449d4e6c23 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 27 Aug 2018 10:14:26 -0400 Subject: Tests: Add RunCMake "prep" step Give tests a chance to write content to the build tree before CMake runs on it. --- Tests/RunCMake/RunCMake.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index c076ad9..4bacd96 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -45,6 +45,11 @@ function(run_cmake test) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") endif() file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + if(RunCMake-prep-file AND EXISTS ${top_src}/${RunCMake-prep-file}) + include(${top_src}/${RunCMake-prep-file}) + else() + include(${top_src}/${test}-prep.cmake OPTIONAL) + endif() if(NOT DEFINED RunCMake_TEST_OPTIONS) set(RunCMake_TEST_OPTIONS "") endif() -- cgit v0.12