mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Let CMake check the presence of GNU utils
In list-licenses.sh it's too late ... the build simply continues if list-licenses.sh returns with a non-zero exit code.
This commit is contained in:
parent
76bd2533a3
commit
287a7f6e98
@ -178,3 +178,15 @@ if (STRIP_PATH)
|
||||
else ()
|
||||
message (FATAL_ERROR "Cannot find strip.")
|
||||
endif ()
|
||||
|
||||
if (OS_DARWIN)
|
||||
# utils/list-licenses/list-licenses.sh (which generates system table system.licenses) needs the GNU versions of find and grep
|
||||
find_program(GFIND_PATH NAMES "gfind")
|
||||
if (NOT GFIND_PATH)
|
||||
message (FATAL_ERROR "GNU find not found. You can install it with 'brew findutils'.")
|
||||
endif()
|
||||
find_program(GGREP_PATH NAMES "ggrep")
|
||||
if (NOT GGREP_PATH)
|
||||
message (FATAL_ERROR "GNU grep not found. You can install it with 'brew grep'.")
|
||||
endif()
|
||||
endif ()
|
||||
|
@ -1,14 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
if ! [ -x "$(command -v ggrep)" ]; then
|
||||
echo 'Error: GNU grep not found. You can install it with "brew grep".' >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -x "$(command -v gfind)" ]; then
|
||||
echo 'Error: GNU find not found. You can install it with "brew findutils".' >&2
|
||||
exit 1
|
||||
fi
|
||||
# use GNU versions, their presence is ensured in cmake/tools.cmake
|
||||
GREP_CMD=ggrep
|
||||
FIND_CMD=gfind
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user