mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-06 19:10:36 +08:00
By default, run ctests on all available cores in parallel.
This commit is contained in:
parent
63a40ffb95
commit
e0c99a8dd6
@ -1,6 +1,7 @@
|
||||
include(EigenTesting)
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
|
||||
# configure the "site" and "buildname"
|
||||
ei_set_sitename()
|
||||
|
||||
@ -8,7 +9,17 @@ ei_set_sitename()
|
||||
ei_set_build_string()
|
||||
|
||||
add_custom_target(buildtests)
|
||||
|
||||
if (NOT EIGEN_CTEST_ARGS)
|
||||
# By default, run tests in parallel on all available cores.
|
||||
include(ProcessorCount)
|
||||
ProcessorCount(NPROC)
|
||||
if(NOT NPROC EQUAL 0)
|
||||
set(EIGEN_CTEST_ARGS "" CACHE STRING "-j"${NPROC})
|
||||
endif()
|
||||
endif()
|
||||
add_custom_target(check COMMAND "ctest" ${EIGEN_CTEST_ARGS})
|
||||
|
||||
add_dependencies(check buildtests)
|
||||
|
||||
# Convenience target for only building GPU tests.
|
||||
|
Loading…
x
Reference in New Issue
Block a user