]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: pass "CC" using configure when building liburing
authorKefu Chai <kchai@redhat.com>
Tue, 27 Apr 2021 05:33:40 +0000 (13:33 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 27 Apr 2021 05:36:23 +0000 (13:36 +0800)
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 <kchai@redhat.com>
cmake/modules/Builduring.cmake

index 328aa5ac79fd583927989b55f510d7be43b10151..feb14f07d4af702c56bfd56f310ebe77cb682115 100644 (file)
@@ -17,8 +17,8 @@ function(build_uring)
   include(ExternalProject)
   ExternalProject_Add(liburing_ext
     ${source_dir_args}
-    CONFIGURE_COMMAND <SOURCE_DIR>/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} <SOURCE_DIR>/configure
+    BUILD_COMMAND ${make_cmd} "CFLAGS=${CMAKE_C_FLAGS} -fPIC" -C src -s
     BUILD_IN_SOURCE 1
     BUILD_BYPRODUCTS "<SOURCE_DIR>/src/liburing.a"
     INSTALL_COMMAND ""