]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: Revert "cmake: use file(GLOB ..) to find .yaml.in files"
authorKefu Chai <kchai@redhat.com>
Fri, 23 Apr 2021 11:17:30 +0000 (19:17 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 14 May 2021 11:15:16 +0000 (19:15 +0800)
This reverts commit 4e58b5899e98397ea928cbde1451b0734fa0892b.

the list of .yaml.in file might change over time before we finish the
.yaml.in file split, but cmake would fail to figure out the list without
rerunning "cmake", so when a new .yaml.in file is introduced, developer
might end up with a FTBFS after pulling the change from remote repo.

so, we need to revert the file(GLOB ..) change, until all .yaml.in file
are created.

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

index 8b934a6df2dc5b83526ae35f0fc816f678cb2b45..6424271e381217385718d3e4b3ce93dd98a0988f 100644 (file)
@@ -21,7 +21,8 @@ function(file_configure input_file output_file)
     VERBATIM)
 endfunction()
 
-function(add_options name yaml_in_file)
+function(add_options name)
+  set(yaml_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${name}.yaml.in)
   set(yaml_file ${CMAKE_CURRENT_BINARY_DIR}/${name}.yaml)
   file_configure("${yaml_in_file}"
     "${yaml_file}" @ONLY)
@@ -78,17 +79,21 @@ if(WITH_MGR)
   endif()
 endif()
 
+add_options(global)
+add_options(cephfs-mirror)
+add_options(crimson)
+add_options(mds)
+add_options(mds-client)
+add_options(rbd)
+add_options(rbd-mirror)
+add_options(immutable-object-cache)
+
 # if set to empty string, system default luarocks package location (if exist) will be used
 set(rgw_luarocks_location "")
 if(WITH_RADOSGW_LUA_PACKAGES)
   set(rgw_luarocks_location "/tmp/luarocks")
 endif()
-
-file(GLOB yaml_in_srcs "*.yaml.in")
-foreach(fn ${yaml_in_srcs})
-  get_filename_component(name ${fn} NAME_WE)
-  add_options(${name} ${fn})
-endforeach()
+add_options(rgw)
 
 add_library(common-options-objs OBJECT
   ${common_options_srcs})