Meta: Print error if cmake does not exist

This commit is contained in:
demostanis 2022-09-02 10:52:15 +02:00 committed by Linus Groh
parent b9dca3300e
commit 1c979889b2
Notes: sideshowbarker 2024-07-17 05:40:46 +09:00
2 changed files with 4 additions and 2 deletions

View file

@ -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}")

View file

@ -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