diff options
author | Brad King <brad.king@kitware.com> | 2021-03-09 12:11:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-03-09 12:35:18 (GMT) |
commit | 5f03744e3661f07e9c59d6e62ceec9ce3b45c404 (patch) | |
tree | f09edcebc427e71f4c40f07361433f5ec0067607 | |
parent | f4d154755ac751541a084415d669deb11e8da76c (diff) | |
download | CMake-5f03744e3661f07e9c59d6e62ceec9ce3b45c404.zip CMake-5f03744e3661f07e9c59d6e62ceec9ce3b45c404.tar.gz CMake-5f03744e3661f07e9c59d6e62ceec9ce3b45c404.tar.bz2 |
Tests: Move RunCMake option construction closer to use
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index c1023f0..a690f4e 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -64,15 +64,6 @@ function(run_cmake test) else() include(${top_src}/${test}-prep.cmake OPTIONAL) endif() - if(NOT DEFINED RunCMake_TEST_OPTIONS) - set(RunCMake_TEST_OPTIONS "") - endif() - if(APPLE) - list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW) - endif() - if(RunCMake_MAKE_PROGRAM) - list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}") - endif() if(RunCMake_TEST_OUTPUT_MERGE) set(actual_stderr_var actual_stdout) set(actual_stderr "") @@ -92,6 +83,15 @@ function(run_cmake test) set(maybe_input_file "") endif() if(NOT RunCMake_TEST_COMMAND) + if(NOT DEFINED RunCMake_TEST_OPTIONS) + set(RunCMake_TEST_OPTIONS "") + endif() + if(APPLE) + list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW) + endif() + if(RunCMake_MAKE_PROGRAM) + list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}") + endif() if(RunCMake_GENERATOR_INSTANCE) set(_D_CMAKE_GENERATOR_INSTANCE "-DCMAKE_GENERATOR_INSTANCE=${RunCMake_GENERATOR_INSTANCE}") else() |