]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: compile crimson-auth with crimson::cflags
authorKefu Chai <kchai@redhat.com>
Fri, 14 Feb 2020 05:58:32 +0000 (13:58 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 14 Feb 2020 06:21:32 +0000 (14:21 +0800)
* move auth related stuff into crimson/CMakeLists.txt, so we can
  link them against crimson::cflags, which populates the necessary
  definitions and other cxx flags when building these source files.
* expose crimson::cflags as a public library of crimson, as
  crimson-osd links against crimson. and the cflags should be populated
  to crimson-osd, otherwise they are compiled with different compiler
  options.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/auth/CMakeLists.txt
src/crimson/CMakeLists.txt

index c977acd8b3de57059471bc489819b9fabd2e3d7e..b6ae0c83efdc0bb9669ce2416ff583134ea80fe7 100644 (file)
@@ -21,10 +21,3 @@ if(HAVE_GSSAPI)
 endif()
 
 add_library(common-auth-objs OBJECT ${auth_srcs})
-if(WITH_SEASTAR)
-  add_library(crimson-auth OBJECT ${auth_srcs})
-  target_compile_definitions(crimson-auth PRIVATE
-    "WITH_SEASTAR=1")
-  target_include_directories(crimson-auth PRIVATE
-    $<TARGET_PROPERTY:Seastar::seastar,INTERFACE_INCLUDE_DIRECTORIES>)
-endif()
index 7f792b64778df25724f5d98fd35c76b740e7e0c2..3784925bd538021b32bf1693c4de1be7252c9ba6 100644 (file)
@@ -103,7 +103,6 @@ add_library(crimson-common STATIC
   ${PROJECT_SOURCE_DIR}/src/osd/OSDMap.cc
   ${PROJECT_SOURCE_DIR}/src/osd/PGPeeringEvent.cc
   ${crimson_common_srcs}
-  $<TARGET_OBJECTS:crimson-auth>
   $<TARGET_OBJECTS:common_mountcephfs_objs>
   $<TARGET_OBJECTS:crimson-crush>)
 
@@ -123,14 +122,26 @@ endif()
 target_link_libraries(crimson-common
   PUBLIC
     json_spirit
+    crimson::cflags
   PRIVATE
     crc32
-    crimson::cflags
     ${crimson_common_deps}
     OpenSSL::Crypto)
 
 set(crimson_auth_srcs
-  auth/KeyRing.cc)
+  auth/KeyRing.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/AuthClientHandler.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/AuthMethodList.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/AuthRegistry.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/AuthSessionHandler.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/Crypto.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/KeyRing.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/RotatingKeyRing.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/cephx/CephxAuthorizeHandler.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/cephx/CephxClientHandler.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/cephx/CephxProtocol.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/cephx/CephxSessionHandler.cc
+  ${PROJECT_SOURCE_DIR}/src/auth/none/AuthNoneAuthorizeHandler.cc)
 set(crimson_mgr_srcs
   mgr/client.cc)
 set(crimson_mon_srcs