Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberium authored Mar 6, 2024
1 parent 7785e51 commit f3d460f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ if(MSVC)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()

# Enable cmake parrallel build
include(ProcessorCount)
ProcessorCount(PROCESSOR_COUNT)
message(STATUS "Detected ${PROCESSOR_COUNT} CPU cores.")
if(PROCESSOR_COUNT LESS_EQUAL 0)
message(FATAL_ERROR "Unable to determine the number of CPU cores.")
else()
set(CMAKE_BUILD_PARALLEL_LEVEL ${PROCESSOR_COUNT})
endif()
# set default buildoptions and print them
include(cmake/options.cmake)

Expand Down

0 comments on commit f3d460f

Please sign in to comment.