cmake: disable VTA on options.cc

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>
This commit is contained in:
Kefu Chai 2017-08-31 18:15:28 +08:00
parent d0f6580a83
commit 4bb56402a6

View 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)