From: Bassam Tabbara Date: Thu, 18 May 2017 06:08:31 +0000 (-0700) Subject: cmake: remove "-Wp" compile option to speedup ccache X-Git-Tag: v12.1.0~10^2~56^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F15147%2Fhead;p=ceph.git cmake: remove "-Wp" compile option to speedup ccache "-Wp" in not needed and when building with ccache the "cache hits" only happen afer preproccessing which is slower than a direct hit. this change removes the "-Wp" option Signed-off-by: Bassam Tabbara --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 387a7d30731b..1d9ccacdfc6b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -69,11 +69,11 @@ endif() include(CheckCCompilerFlag) if(CMAKE_CXX_COMPILER_ID STREQUAL GNU) - CHECK_C_COMPILER_FLAG("-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=2" HAS_FORTIFY_SOURCE) + CHECK_C_COMPILER_FLAG("-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" HAS_FORTIFY_SOURCE) if(NOT CMAKE_BUILD_TYPE STREQUAL Debug) if(HAS_FORTIFY_SOURCE) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=2") - set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=2") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2") + set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2") endif() endif() CHECK_C_COMPILER_FLAG(-fstack-protector-strong HAS_STACK_PROTECT)