From 58c4c9250f594fec957052bfe5753b012518cce9 Mon Sep 17 00:00:00 2001 From: Bassam Tabbara Date: Wed, 17 May 2017 23:08:31 -0700 Subject: [PATCH] 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 --- src/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 387a7d30731bc..1d9ccacdfc6ba 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) -- 2.39.5