]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: no need to add "-D" before definitions
authorKefu Chai <kchai@redhat.com>
Wed, 29 Aug 2018 09:00:15 +0000 (17:00 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 29 Aug 2018 09:00:35 +0000 (17:00 +0800)
and there is no need to make the definition public for the executable
target.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/CMakeLists.txt
src/test/librbd/CMakeLists.txt

index b82ec2b34aa006e2fd5073432c366f9b9a8ef537..fa85ea598509df500ca10201ae6ed7fb17299f10 100644 (file)
@@ -129,8 +129,8 @@ add_library(common-common-objs OBJECT
   ${common_srcs})
 # for options.cc
 target_compile_definitions(common-common-objs PRIVATE
-  "-DCEPH_LIBDIR=\"${CMAKE_INSTALL_FULL_LIBDIR}\""
-  "-DCEPH_PKGLIBDIR=\"${CMAKE_INSTALL_FULL_PKGLIBDIR}\"")
+  "CEPH_LIBDIR=\"${CMAKE_INSTALL_FULL_LIBDIR}\""
+  "CEPH_PKGLIBDIR=\"${CMAKE_INSTALL_FULL_PKGLIBDIR}\"")
 
 set(common_mountcephfs_srcs
   armor.c
index bd54cef1cda4eed2b58e3a84cda1ab5f12e93f21..6b6b3b99c89a8dad5a309fd41ce646e1355bf67f 100644 (file)
@@ -90,7 +90,7 @@ set(unittest_librbd_srcs
 add_executable(unittest_librbd
   ${unittest_librbd_srcs}
   $<TARGET_OBJECTS:common_texttable_obj>)
-target_compile_definitions(unittest_librbd PUBLIC "-DTEST_LIBRBD_INTERNALS")
+target_compile_definitions(unittest_librbd PRIVATE "TEST_LIBRBD_INTERNALS")
 target_link_libraries(unittest_librbd
   cls_rbd
   cls_rbd_client
@@ -127,7 +127,7 @@ target_link_libraries(ceph_test_librbd
   librados
   ${UNITTEST_LIBS}
   radostest)
-target_compile_definitions(ceph_test_librbd PUBLIC "-DTEST_LIBRBD_INTERNALS")
+target_compile_definitions(ceph_test_librbd PRIVATE "TEST_LIBRBD_INTERNALS")
 
 add_executable(ceph_test_librbd_api
   test_support.cc