@@ -29,7 +29,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/windows.cmake)
2929# Detect number of processors
3030include (ProcessorCount)
3131ProcessorCount(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." )
3333
3434# List of known platforms
3535set (PLATFORM_LIST
@@ -197,15 +197,21 @@ function(godotcpp_generate)
197197 another compiler simulating the Visual C++ cl command-line syntax. ]]
198198 if (MSVC )
199199 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." )
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 (
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"
206212 " command."
207213 )
208- message (" eg. cmake --build . -j 7 ..." )
214+ message (STATUS " eg. cmake --build . -j 7 ..." )
209215 endif ()
210216
211217 #[[ GODOTCPP_SYMBOL_VISIBLITY
@@ -245,8 +251,8 @@ function(godotcpp_generate)
245251 # Build Profile
246252 if (GODOTCPP_BUILD_PROFILE)
247253 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} '" )
250256 build_profile_generate_trimmed_api(
251257 "${GODOTCPP_BUILD_PROFILE} "
252258 "${GODOTCPP_GDEXTENSION_API_FILE} "
0 commit comments