From: Kefu Chai Date: Tue, 27 Apr 2021 05:33:40 +0000 (+0800) Subject: cmake: pass "CC" using configure when building liburing X-Git-Tag: v17.1.0~2118^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e25c046f31c9822b094cabc9c89f08bae28aca44;p=ceph.git cmake: pass "CC" using configure when building liburing since liburing's configure checks the CC and CXX env variables, let's pass them when calling "configure". otherwise "make" still uses gcc and g++ by default as they are specified in the "configure" script. this also matches with the way how debian/rules calls "make". Signed-off-by: Kefu Chai --- diff --git a/cmake/modules/Builduring.cmake b/cmake/modules/Builduring.cmake index 328aa5ac79f..feb14f07d4a 100644 --- a/cmake/modules/Builduring.cmake +++ b/cmake/modules/Builduring.cmake @@ -17,8 +17,8 @@ function(build_uring) include(ExternalProject) ExternalProject_Add(liburing_ext ${source_dir_args} - CONFIGURE_COMMAND /configure - BUILD_COMMAND env CC=${CMAKE_C_COMPILER} "CFLAGS=${CMAKE_C_FLAGS} -fPIC" ${make_cmd} -C src -s + CONFIGURE_COMMAND env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} /configure + BUILD_COMMAND ${make_cmd} "CFLAGS=${CMAKE_C_FLAGS} -fPIC" -C src -s BUILD_IN_SOURCE 1 BUILD_BYPRODUCTS "/src/liburing.a" INSTALL_COMMAND ""