1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +00:00

Meta: Error out on find_program errors with CMake less than 3.18

We have seen some cases where the build fails for folks, and they are
missing unzip/tar/gzip etc. We can catch some of these in CMake itself,
so lets make sure to handle that uniformly across the build system.

The REQUIRED flag to `find_program` was only added on in CMake 3.18 and
above, so we can't rely on that to actually halt the program execution.
This commit is contained in:
Brian Gianforcaro 2022-03-18 04:31:36 -07:00 committed by Brian Gianforcaro
parent 6b5f0d11ce
commit 66e7ac1954
6 changed files with 31 additions and 10 deletions

View file

@ -22,8 +22,8 @@ if(INCLUDE_WASM_SPEC_TESTS)
if(EXISTS ${WASM_SPEC_TEST_GZ_PATH} AND NOT EXISTS ${WASM_SPEC_TEST_PATH})
message(STATUS "Extracting the WebAssembly testsuite from ${WASM_SPEC_TEST_GZ_PATH}...")
file(MAKE_DIRECTORY ${WASM_SPEC_TEST_PATH})
execute_process(COMMAND gzip -k -d ${WASM_SPEC_TEST_GZ_PATH})
execute_process(COMMAND tar -xf ${WASM_SPEC_TEST_TAR_PATH})
execute_process(COMMAND "${GZIP_TOOL}" -k -d ${WASM_SPEC_TEST_GZ_PATH})
execute_process(COMMAND "${TAR_TOOL}" -xf ${WASM_SPEC_TEST_TAR_PATH})
execute_process(COMMAND rm ${WASM_SPEC_TEST_TAR_PATH})
file(GLOB WASM_TESTS "${CMAKE_BINARY_DIR}/testsuite-main/*.wast")
foreach(PATH ${WASM_TESTS})