forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
6 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# Check for the dependencies that the Serenity (target) and Lagom (host) builds require. | ||
# | ||
|
||
# FIXME: With cmake 3.18, we can change unzip/untar/gzip steps to use | ||
# file( ARCHIVE_EXTRACT) instead | ||
# | ||
# Additionally we have to emit an error message for each tool, | ||
# as REQUIRED only works with cmake 3.18 and above. | ||
find_program(UNZIP_TOOL unzip REQUIRED) | ||
if (NOT UNZIP_TOOL) | ||
message(FATAL_ERROR "Failed to locate unzip on your machine, please install it and re-read the SerenityOS build documentation.") | ||
endif() | ||
|
||
find_program(TAR_TOOL tar REQUIRED) | ||
if (NOT TAR_TOOL) | ||
message(FATAL_ERROR "Failed to locate tar on your machine, please install it and re-read the SerenityOS build documentation.") | ||
endif() | ||
|
||
find_program(GZIP_TOOL gzip REQUIRED) | ||
if (NOT GZIP_TOOL) | ||
message(FATAL_ERROR "Failed to locate gzip on your machine, please install it and re-read the SerenityOS build documentation.") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters