aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-07-10 16:37:39 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-07-10 16:37:39 +0200
commitc3ed974e50e3bb8a13d0a8646261018a2487f168 (patch)
treef5f5fea56d8124864b70af1876ac0eca7f4e87ef /cmake
parentd4288852570c773a3845811f6d5cc14355900027 (diff)
downloadcmocka-c3ed974e50e3bb8a13d0a8646261018a2487f168.tar.gz
cmocka-c3ed974e50e3bb8a13d0a8646261018a2487f168.tar.xz
cmocka-c3ed974e50e3bb8a13d0a8646261018a2487f168.zip
cmake: Pass _FORTIFY_SOURCE directly to the preprocessor.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/DefineCompilerFlags.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake
index aea8128..dcf79ab 100644
--- a/cmake/Modules/DefineCompilerFlags.cmake
+++ b/cmake/Modules/DefineCompilerFlags.cmake
@@ -29,9 +29,9 @@ if (UNIX AND NOT WIN32)
if (CMAKE_BUILD_TYPE)
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
if (NOT CMAKE_BUILD_TYPE_LOWER MATCHES debug)
- check_c_compiler_flag("-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
+ check_c_compiler_flag("-Wp,-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
if (WITH_FORTIFY_SOURCE)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wp,-D_FORTIFY_SOURCE=2")
endif (WITH_FORTIFY_SOURCE)
endif()
endif()