From f81815e48ac1e50dfd434e9eec2e0a270595b205 Mon Sep 17 00:00:00 2001 From: Sacha Date: Wed, 28 Feb 2018 10:25:25 +1000 Subject: [PATCH] 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. --- cmake/system.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/system.cmake b/cmake/system.cmake index 064e7e4f2..3fdd9390c 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -97,7 +97,7 @@ if (NOT CMAKE_CROSSCOMPILING) endif() if (NOT DEFINED NUM_THREADS) - if (NOT NUM_CORES EQUAL 0) + if (DEFINED NUM_CORES AND NOT NUM_CORES EQUAL 0) # HT? set(NUM_THREADS ${NUM_CORES}) else ()