From: Kefu Chai Date: Wed, 13 Jul 2016 04:58:31 +0000 (+0800) Subject: cmake: disable -fvar-tracking-assignments for ceph_dencoder.cc X-Git-Tag: ses5-milestone5~424^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F10275%2Fhead;p=ceph.git cmake: disable -fvar-tracking-assignments for ceph_dencoder.cc there are too many variables involved in main() of ceph_dencoder.cc, but -fvar-tracking-assignments is enabled by default, when the compiler finds that the number of variables exceeds the limit "max-vartrack-size", it gives up, and tries again disabling this option. this change avoids the recompilation of ceph_dencoder.cc and also silences the warning of ``` /home/jenkins-build/build/workspace/ceph-pull-requests/src/test/encoding/ceph_dencoder.cc: In function ‘int main(int, const char**)’: /home/jenkins-build/build/workspace/ceph-pull-requests/src/test/encoding/ceph_dencoder.cc:289:5: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without int main(int argc, const char **argv) ^ ``` Signed-off-by: Kefu Chai --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cec6efbe9197..429af422524f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -684,6 +684,12 @@ add_subdirectory(ceph-disk) 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) +endif() + set(dencoder_srcs test/encoding/ceph_dencoder.cc $