diff --git a/Meta/CMake/processor-count.cmake b/Meta/CMake/processor-count.cmake index d77786de4c2..f0bf79f929a 100644 --- a/Meta/CMake/processor-count.cmake +++ b/Meta/CMake/processor-count.cmake @@ -1,3 +1,5 @@ include(ProcessorCount) ProcessorCount(N) -message("${N}") +# Executing echo here allows us to print to the standard output, +# to separate the processor count from potential errors +execute_process(COMMAND "${CMAKE_COMMAND}" -E echo "${N}") diff --git a/Meta/serenity.sh b/Meta/serenity.sh index 1d0e5f356ad..50a5f8efb77 100755 --- a/Meta/serenity.sh +++ b/Meta/serenity.sh @@ -262,7 +262,7 @@ build_target() { fi # Get either the environment MAKEJOBS or all processors via CMake - [ -z "$MAKEJOBS" ] && MAKEJOBS=$(cmake -P "$SERENITY_SOURCE_DIR/Meta/CMake/processor-count.cmake" 2>&1) + [ -z "$MAKEJOBS" ] && MAKEJOBS=$(cmake -P "$SERENITY_SOURCE_DIR/Meta/CMake/processor-count.cmake") # With zero args, we are doing a standard "build" # With multiple args, we are doing an install/image/run