]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: remove "-Wp" compile option to speedup ccache 15147/head
authorBassam Tabbara <bassam.tabbara@quantum.com>
Thu, 18 May 2017 06:08:31 +0000 (23:08 -0700)
committerBassam Tabbara <bassam.tabbara@quantum.com>
Thu, 18 May 2017 06:22:49 +0000 (23:22 -0700)
"-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 <bassam.tabbara@quantum.com>
src/CMakeLists.txt

index 387a7d30731bc0047260d64b85797b5ca96efc2e..1d9ccacdfc6bac5f8ede75f9180621cf4cd41d53 100644 (file)
@@ -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)