]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: disable VTA on options.cc 17393/head
authorKefu Chai <kchai@redhat.com>
Thu, 31 Aug 2017 10:15:28 +0000 (18:15 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 31 Aug 2017 10:21:39 +0000 (18:21 +0800)
to silence following warning and to avoid compiling this file twice:

ceph/src/common/options.cc: In function ‘std::vector<Option> get_global_options()’:
ceph/src/common/options.cc:151:21: note: variable tracking
size limit exceeded with -fvar-tracking-assignments, retrying without
 std::vector<Option> get_global_options() {
                     ^~~~~~~~~~~~~~~~~~

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

index a9936b1392dd3095db099dc2abcc110c953ad311..534952e0dfce9ec66153815f9a346f79edd44db7 100644 (file)
@@ -540,8 +540,11 @@ set(libcommon_files
   ${auth_files}
   ${mds_files})
 
+CHECK_C_COMPILER_FLAG("-fvar-tracking-assignments" HAS_VTA)
 if(HAS_VTA)
-  set_source_files_properties(common/config.cc
+  set_source_files_properties(
+    common/config.cc
+    common/options.cc
     PROPERTIES COMPILE_FLAGS -fno-var-tracking-assignments)
 endif()
 
@@ -729,7 +732,6 @@ add_subdirectory(ceph-volume)
 add_subdirectory(ceph-detect-init)
 
 ## dencoder
-CHECK_C_COMPILER_FLAG("-fvar-tracking-assignments" HAS_VTA)
 if(HAS_VTA)
   set_source_files_properties(test/encoding/ceph_dencoder.cc
     PROPERTIES COMPILE_FLAGS -fno-var-tracking-assignments)