summaryrefslogtreecommitdiff
path: root/Tests/BootstrapTest.cmake
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-10-21 18:18:18 +0200
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-10-21 18:22:44 +0200
commite3770c56a8ef6b20f473556a1ca29ea6e0f51f7f (patch)
treeb98a6760e5d2327eeb05616e7816d48334baf104 /Tests/BootstrapTest.cmake
parent1e555a44aa4e3d40bca2f88915c9f957098e5a55 (diff)
downloadcmake-e3770c56a8ef6b20f473556a1ca29ea6e0f51f7f.tar.gz
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.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/Tests/BootstrapTest.cmake b/Tests/BootstrapTest.cmake
index 9c9fe09ac9..07a65bfd6f 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
)