diff --git a/cmake/system.cmake b/cmake/system.cmake index 236a7e888..064e7e4f2 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -94,16 +94,17 @@ if (NOT CMAKE_CROSSCOMPILING) ProcessorCount(NUM_CORES) endif() +endif() + +if (NOT DEFINED NUM_THREADS) if (NOT NUM_CORES EQUAL 0) # HT? set(NUM_THREADS ${NUM_CORES}) + else () + set(NUM_THREADS 0) endif () endif() -if (NOT DEFINED NUM_THREADS) - set(NUM_THREADS 0) -endif() - if (${NUM_THREADS} LESS 2) set(USE_THREAD 0) elseif(NOT DEFINED USE_THREAD)