diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /cmake/modules/FindMake.cmake | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/modules/FindMake.cmake')
-rw-r--r-- | cmake/modules/FindMake.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cmake/modules/FindMake.cmake b/cmake/modules/FindMake.cmake new file mode 100644 index 000000000..2a57a8df7 --- /dev/null +++ b/cmake/modules/FindMake.cmake @@ -0,0 +1,17 @@ +function(find_make make_exe make_cmd) + # make_exe the name of the variable whose value will be the path to "make" + # executable + # make_cmd the name of the variable whose value will be the command to + # used in the generated build script executed by the cmake generator + find_program(MAKE_EXECUTABLE NAMES gmake make) + if(NOT MAKE_EXECUTABLE) + message(FATAL_ERROR "Can't find make") + endif() + set(${make_exe} "${MAKE_EXECUTABLE}" PARENT_SCOPE) + if(CMAKE_MAKE_PROGRAM MATCHES "make") + # try to inherit command line arguments passed by parent "make" job + set(${make_cmd} "$(MAKE)" PARENT_SCOPE) + else() + set(${make_cmd} "${MAKE_EXECUTABLE}" PARENT_SCOPE) + endif() +endfunction() |