This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch branch-1.17.x in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 316922fb08cf83d61349a80ccce92a4f62358580 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]> (cherry picked from commit a119f1b6b473d60bb1e38071e873ff2d5d708062) Reviewed-on: http://gerrit.cloudera.org:8080/21785 Reviewed-by: Alexey Serbin <[email protected]> Tested-by: Abhishek Chennaka <[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 604cf13ad..e19ff6c7c 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)
