mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-01 16:02:53 +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:
parent
6b5f0d11ce
commit
66e7ac1954
Notes:
sideshowbarker
2024-07-17 17:04:32 +09:00
Author: https://github.com/bgianfo
Commit: 66e7ac1954
Pull-request: https://github.com/SerenityOS/serenity/pull/13110
Reviewed-by: https://github.com/ADKaster ✅
6 changed files with 31 additions and 10 deletions
|
@ -91,7 +91,7 @@ set(CLDR_UNITS_PATH "${CLDR_PATH}/${CLDR_UNITS_SOURCE}")
|
|||
function(extract_cldr_file source path)
|
||||
if(EXISTS "${CLDR_ZIP_PATH}" AND NOT EXISTS "${path}")
|
||||
message(STATUS "Extracting CLDR ${source} from ${CLDR_ZIP_PATH}...")
|
||||
execute_process(COMMAND unzip -q "${CLDR_ZIP_PATH}" "${source}/**" -d "${CLDR_PATH}" RESULT_VARIABLE unzip_result)
|
||||
execute_process(COMMAND "${UNZIP_TOOL}" -q "${CLDR_ZIP_PATH}" "${source}/**" -d "${CLDR_PATH}" RESULT_VARIABLE unzip_result)
|
||||
if (NOT unzip_result EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to unzip ${source} from ${CLDR_ZIP_PATH} with status ${unzip_result}")
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue