diff options
author | Brad King <brad.king@kitware.com> | 2018-08-27 14:14:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-12-11 17:50:21 (GMT) |
commit | c3635e502c9804fc0ab781b9f20e07449d4e6c23 (patch) | |
tree | d83de253da707b02eb9780b28d4186082c5a50fe /Tests/RunCMake/RunCMake.cmake | |
parent | 1c03c12b1dfe56be5f303aef022da0fed8dee609 (diff) | |
download | CMake-c3635e502c9804fc0ab781b9f20e07449d4e6c23.zip CMake-c3635e502c9804fc0ab781b9f20e07449d4e6c23.tar.gz CMake-c3635e502c9804fc0ab781b9f20e07449d4e6c23.tar.bz2 |
Tests: Add RunCMake "prep" step
Give tests a chance to write content to the build tree before CMake
runs on it.
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
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() |