Allow overriding NUM_THREADS
This commit is contained in:
parent
cc26cdce0c
commit
e0ddd7d124
|
@ -94,14 +94,15 @@ if (NOT CMAKE_CROSSCOMPILING)
|
||||||
ProcessorCount(NUM_CORES)
|
ProcessorCount(NUM_CORES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT NUM_CORES EQUAL 0)
|
|
||||||
# HT?
|
|
||||||
set(NUM_THREADS ${NUM_CORES})
|
|
||||||
endif ()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED NUM_THREADS)
|
if (NOT DEFINED NUM_THREADS)
|
||||||
set(NUM_THREADS 0)
|
if (NOT NUM_CORES EQUAL 0)
|
||||||
|
# HT?
|
||||||
|
set(NUM_THREADS ${NUM_CORES})
|
||||||
|
else ()
|
||||||
|
set(NUM_THREADS 0)
|
||||||
|
endif ()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (${NUM_THREADS} LESS 2)
|
if (${NUM_THREADS} LESS 2)
|
||||||
|
|
Loading…
Reference in New Issue