diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-10-21 16:18:18 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-10-21 16:22:44 (GMT) |
commit | e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f (patch) | |
tree | b98a6760e5d2327eeb05616e7816d48334baf104 /Tests/BootstrapTest.cmake | |
parent | 1e555a44aa4e3d40bca2f88915c9f957098e5a55 (diff) | |
download | CMake-e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f.zip CMake-e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f.tar.gz CMake-e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f.tar.bz2 |
BootstrapTest: Use --parallel=... argument.
Determine the number of processors and provide it to the bootstrap
script. Also make sure this test does not run parallel with other
tests.
Diffstat (limited to 'Tests/BootstrapTest.cmake')
-rw-r--r-- | Tests/BootstrapTest.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Tests/BootstrapTest.cmake b/Tests/BootstrapTest.cmake index 9c9fe09..07a65bf 100644 --- a/Tests/BootstrapTest.cmake +++ b/Tests/BootstrapTest.cmake @@ -1,7 +1,12 @@ file(MAKE_DIRECTORY "${bin_dir}") -message(STATUS "running bootstrap: ${bootstrap}") +include(ProcessorCount) +ProcessorCount(nproc) +if(NOT nproc EQUAL 0) + set(parallel_arg --parallel=${nproc}) +endif() +message(STATUS "running bootstrap: ${bootstrap} ${parallel_arg}") execute_process( - COMMAND ${bootstrap} + COMMAND ${bootstrap} ${parallel_arg} WORKING_DIRECTORY "${bin_dir}" RESULT_VARIABLE result ) |