This is an automated email from the ASF dual-hosted git repository.
abukor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new a119f1b6b [cmake] Kudu should compile on Mac OS without SDKROOT set.
a119f1b6b is described below
commit a119f1b6b473d60bb1e38071e873ff2d5d708062
Author: Zoltan Martonka <[email protected]>
AuthorDate: Thu May 25 09:09:16 2023 +0200
[cmake] Kudu should compile on Mac OS without SDKROOT set.
Cmake figures out the sdkroot path perfectly without the environment
variable SDKROOT. The only thing that fails is the linker test in
cmake_modules/KuduLinker.cmake. Setting SDKROOT is also missing from
the docs/installation.adoc, although it is mandatory (it should not).
Change-Id: I1cfe84f31238ccb208bdf49e8b05688107dd5ae2
Reviewed-on: http://gerrit.cloudera.org:8080/19935
Tested-by: Kudu Jenkins
Reviewed-by: Attila Bukor <[email protected]>
Tested-by: Attila Bukor <[email protected]>
---
cmake_modules/KuduLinker.cmake | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/cmake_modules/KuduLinker.cmake b/cmake_modules/KuduLinker.cmake
index c35df4ff9..399883ccd 100644
--- a/cmake_modules/KuduLinker.cmake
+++ b/cmake_modules/KuduLinker.cmake
@@ -109,11 +109,13 @@ function(GET_LINKER_VERSION)
endif()
if (APPLE)
set(ld_version_flag "-v,-bundle")
+ set(osx_sysroot --sysroot ${CMAKE_OSX_SYSROOT})
else()
set(ld_version_flag "--version")
+ set(osx_sysroot "")
endif()
execute_process(
- COMMAND ${CMAKE_CXX_COMPILER} "-Wl,${ld_version_flag}" -o /dev/null ${ARGN}
+ COMMAND ${CMAKE_CXX_COMPILER} ${osx_sysroot} "-Wl,${ld_version_flag}" -o
/dev/null ${ARGN}
ERROR_VARIABLE LINKER_STDERR
OUTPUT_VARIABLE LINKER_STDOUT
RESULT_VARIABLE LINKER_EXITCODE)