Fix CMake cross-compiling
Without specifying thread count, NUM_THREADS would not be defined and CMake would fail. This is because core count cannot be determined when cross-compiling.
This commit is contained in:
parent
5f855d965d
commit
f81815e48a
|
@ -97,7 +97,7 @@ if (NOT CMAKE_CROSSCOMPILING)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED NUM_THREADS)
|
if (NOT DEFINED NUM_THREADS)
|
||||||
if (NOT NUM_CORES EQUAL 0)
|
if (DEFINED NUM_CORES AND NOT NUM_CORES EQUAL 0)
|
||||||
# HT?
|
# HT?
|
||||||
set(NUM_THREADS ${NUM_CORES})
|
set(NUM_THREADS ${NUM_CORES})
|
||||||
else ()
|
else ()
|
||||||
|
|
Loading…
Reference in New Issue