@@ -29,7 +29,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/windows.cmake)
29
29
# Detect number of processors
30
30
include (ProcessorCount )
31
31
ProcessorCount (PROC_MAX )
32
- message ("Auto-detected ${PROC_MAX} CPU cores available for build parallelism." )
32
+ message (STATUS "Auto-detected ${PROC_MAX} CPU cores available for build parallelism." )
33
33
34
34
# List of known platforms
35
35
set (PLATFORM_LIST
@@ -197,15 +197,21 @@ function(godotcpp_generate)
197
197
another compiler simulating the Visual C++ cl command-line syntax. ]]
198
198
if (MSVC )
199
199
math (EXPR PROC_N "(${PROC_MAX} -1) | (${X} -2)>>31 & 1" )
200
- message ("Using ${PROC_N} cores for multi-threaded compilation." )
200
+ message (STATUS "Using ${PROC_N} cores for multi-threaded compilation." )
201
201
# TODO You can override it at configure time with ...." )
202
202
else ()
203
+ if (CMAKE_BUILD_PARALLEL_LEVEL )
204
+ set (_cores "${CMAKE_BUILD_PARALLEL_LEVEL} " )
205
+ else ()
206
+ set (_cores "all" )
207
+ endif ()
203
208
message (
204
- "Using ${CMAKE_BUILD_PARALLEL_LEVEL} cores, You can override"
205
- " it at configure time by using -j <n> or --parallel <n> on the build"
209
+ STATUS
210
+ "Using ${_cores} cores. You can override"
211
+ " this at configure time by using -j <n> or --parallel <n> in the build"
206
212
" command."
207
213
)
208
- message (" eg. cmake --build . -j 7 ..." )
214
+ message (STATUS " eg. cmake --build . -j 7 ..." )
209
215
endif ()
210
216
211
217
#[[ GODOTCPP_SYMBOL_VISIBLITY
@@ -245,8 +251,8 @@ function(godotcpp_generate)
245
251
# Build Profile
246
252
if (GODOTCPP_BUILD_PROFILE )
247
253
message (STATUS "Using build profile to trim api file" )
248
- message ("\t BUILD_PROFILE = '${GODOTCPP_BUILD_PROFILE} '" )
249
- message ("\t API_SOURCE = '${GODOTCPP_GDEXTENSION_API_FILE} '" )
254
+ message (STATUS "\t BUILD_PROFILE = '${GODOTCPP_BUILD_PROFILE} '" )
255
+ message (STATUS "\t API_SOURCE = '${GODOTCPP_GDEXTENSION_API_FILE} '" )
250
256
build_profile_generate_trimmed_api (
251
257
"${GODOTCPP_BUILD_PROFILE} "
252
258
"${GODOTCPP_GDEXTENSION_API_FILE} "
0 commit comments