Skip to content

Commit 0c2e66e

Browse files
author
marcin.mirski
committed
Improve CMAKE_BUILD_PARALLEL_LEVEL message
1 parent 8eac097 commit 0c2e66e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cmake/godotcpp.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,15 @@ function(godotcpp_generate)
200200
message(STATUS "Using ${PROC_N} cores for multi-threaded compilation.")
201201
# TODO You can override it at configure time with ...." )
202202
else()
203+
if(CMAKE_BUILD_PARALLEL_LEVEL)
204+
set(_cores "${CMAKE_BUILD_PARALLEL_LEVEL}")
205+
else()
206+
set(_cores "all")
207+
endif()
203208
message(
204209
STATUS
205-
"Using ${CMAKE_BUILD_PARALLEL_LEVEL} cores, You can override"
206-
" it at configure time by using -j <n> or --parallel <n> on the build"
210+
"Using ${_cores} cores. You can override"
211+
" this at configure time by using -j <n> or --parallel <n> in the build"
207212
" command."
208213
)
209214
message(STATUS " eg. cmake --build . -j 7 ...")

0 commit comments

Comments
 (0)