Fix cmake warning and default to j0.

This commit is contained in:
Antonio Sánchez 2025-03-29 16:09:40 +00:00 committed by Rasmus Munk Larsen
parent e0c99a8dd6
commit 9cc9209b9b
2 changed files with 9 additions and 13 deletions

View File

@ -12,11 +12,7 @@ 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()
set(EIGEN_CTEST_ARGS "" CACHE STRING "-j0")
endif()
add_custom_target(check COMMAND "ctest" ${EIGEN_CTEST_ARGS})