From e25c046f31c9822b094cabc9c89f08bae28aca44 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 27 Apr 2021 13:33:40 +0800 Subject: [PATCH] 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 --- cmake/modules/Builduring.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 "" -- 2.39.5