]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
CMakeLists.txt: Rewrite 2 remaning options to WITH_
authorWillem Jan Withagen <wjw@digiware.nl>
Fri, 26 May 2017 09:58:14 +0000 (11:58 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Sun, 2 Jul 2017 15:10:01 +0000 (17:10 +0200)
All options to en/disable inclusion of libraries or other software
are of the format WITH_ so that the Cmake commaind like ahs all
WITH_* options. The WITH_=ON option will result in a HAVE_ setting
in CMAKE so that tests can use that variable.

Last "abusers" to actually follow this format.

 - HAVE_BABELTRACE

 - HAVE_ZFSLIB is fixed in #15907

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
CMakeLists.txt
ceph.spec.in
src/rbd_replay/CMakeLists.txt

index 8f0dab6f82d95e433da98588112386fc1a03c8a5..2cfd6b7921cba7839238d97b8408d3d21958c761 100644 (file)
@@ -453,14 +453,14 @@ endif(${WITH_LTTNG})
 option(WITH_OSD_INSTRUMENT_FUNCTIONS OFF)
 
 #option for Babeltrace
-option(HAVE_BABELTRACE "Babeltrace libraries are enabled" ON)
-if(${HAVE_BABELTRACE})
+option(WITH_BABELTRACE "Babeltrace libraries are enabled" ON)
+if(WITH_BABELTRACE)
+  set(HAVE_BABELTRACE ON)
   find_package(babeltrace REQUIRED)
-  set(WITH_BABELTRACE ${BABELTRACE_FOUND})
   set(HAVE_BABELTRACE_BABELTRACE_H ${BABELTRACE_FOUND})
   set(HAVE_BABELTRACE_CTF_EVENTS_H ${BABELTRACE_FOUND})
   set(HAVE_BABELTRACE_CTF_ITERATOR_H ${BABELTRACE_FOUND})
-endif(${HAVE_BABELTRACE})
+endif(WITH_BABELTRACE)
 
 option(DEBUG_GATHER "C_Gather debugging is enabled" ON)
 option(HAVE_LIBZFS "LibZFS is enabled" OFF)
index 54fe4b319f6eeb7812c6ad8b9c94e059dcd79429..2abd91a2575644ea7eb1b499d5294815da4440b1 100644 (file)
@@ -836,10 +836,10 @@ cmake .. \
 %endif
 %if %{with lttng}
     -DWITH_LTTNG=ON \
-    -DHAVE_BABELTRACE=ON \
+    -DWTIH_BABELTRACE=ON \
 %else
     -DWITH_LTTNG=OFF \
-    -DHAVE_BABELTRACE=OFF \
+    -DWTIH_BABELTRACE=OFF \
 %endif
     $CEPH_EXTRA_CMAKE_ARGS \
 %if 0%{with ocf}
index 100a3ab861b3a435df56716a5eedde4ae8b19d89..2e2e176d80b389fb32eb21cfbbc87c465c1a1af4 100644 (file)
@@ -23,7 +23,7 @@ set(librbd_replay_ios_srcs
 add_library(rbd_replay_ios STATIC ${librbd_replay_ios_srcs})
 target_link_libraries(rbd_replay_ios librbd librados global)
 
-if(${WITH_BABELTRACE})
+if(HAVE_BABELTRACE)
   add_executable(rbd-replay-prep
     rbd-replay-prep.cc)
   target_link_libraries(rbd-replay-prep
@@ -39,4 +39,5 @@ if(${WITH_BABELTRACE})
     Boost::date_time
     )
   install(TARGETS rbd-replay-prep DESTINATION bin)
-endif(${WITH_BABELTRACE})
+endif(HAVE_BABELTRACE)
+