Browse Source

Allow overriding NUM_THREADS

tags/v0.3.0
Isuru Fernando 8 years ago
parent
commit
e0ddd7d124
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      cmake/system.cmake

+ 5
- 4
cmake/system.cmake View File

@@ -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)


Loading…
Cancel
Save