mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-09 01:01:12 +00:00
Tests: Add option to control bootstrap arguments in BootstrapTest
In some environments, `bootstrap` may need explicit arguments to work.
This commit is contained in:
@@ -7,9 +7,13 @@ endif()
|
||||
if(NOT nproc EQUAL 0)
|
||||
set(parallel_arg --parallel=${nproc})
|
||||
endif()
|
||||
message(STATUS "running bootstrap: ${bootstrap} ${ninja_arg} ${parallel_arg}")
|
||||
if(args)
|
||||
string(JOIN "\" \"" args_string ${args})
|
||||
set(args_string " \"${args_string}\"")
|
||||
endif()
|
||||
message(STATUS "running bootstrap: ${bootstrap} ${ninja_arg} ${parallel_arg}${args_string}")
|
||||
execute_process(
|
||||
COMMAND ${bootstrap} ${ninja_arg} ${parallel_arg}
|
||||
COMMAND ${bootstrap} ${ninja_arg} ${parallel_arg} ${args}
|
||||
WORKING_DIRECTORY "${bin_dir}"
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
|
||||
@@ -3198,6 +3198,7 @@ if(BUILD_TESTING)
|
||||
-D "bootstrap=${bootstrap}"
|
||||
-D "bin_dir=${CMake_BINARY_DIR}/Tests/BootstrapTest"
|
||||
-D "generator=${CMAKE_GENERATOR}"
|
||||
-D "args=${CMake_TEST_BOOTSTRAP_ARGS}"
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/BootstrapTest.cmake
|
||||
)
|
||||
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BootstrapTest")
|
||||
|
||||
Reference in New Issue
Block a user