diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-20 16:32:27 -0700 |
---|---|---|
committer | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-22 16:30:59 -0700 |
commit | 3b433d829ccfc0d91cb98f368a8896f5ccad1671 (patch) | |
tree | 1f52824fbfe88eb3a94594c5f4cf87a30a3f0803 /CMakeLists.txt | |
parent | e86a06829491bae68cef1b2156d245874516fd17 (diff) |
cmake: Run make coverage in parallel by default.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 36d88c12f..011ff2fe5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,6 +105,16 @@ set(OPTIMIZATION_LEVEL 3) set(GPL_LIBS "") #-----------------------------------------------------------------------------# +# Determine number of threads available, used to configure (default) parallel +# execution of custom test targets (can be overriden with ARGS=-jN). + +include(ProcessorCount) +ProcessorCount(CTEST_NTHREADS) +if(CTEST_NTHREADS EQUAL 0) + set(CTEST_NTHREADS 1) +endif() + +#-----------------------------------------------------------------------------# # Build types # Note: Module CodeCoverage requires the name of the debug build to conform @@ -221,7 +231,7 @@ if(ENABLE_COVERAGE) add_definitions(-DCVC4_COVERAGE) setup_target_for_coverage_lcov( NAME coverage - EXECUTABLE ctest $(ARGS) + EXECUTABLE ctest -j${CTEST_NTHREADS} $(ARGS) DEPENDENCIES cvc4-bin) endif() |