aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-07-10 16:39:01 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-07-13 13:54:00 +0200
commit97e7c95d212d97bdc24f3c2280e842cfe15cac67 (patch)
treee58e95b4113d5ca643c05923dcfde2cc5bfa99be /cmake/Modules
parente52cc613e4127d419b79aca5db9e5493f62a5593 (diff)
downloadlibssh-97e7c95d212d97bdc24f3c2280e842cfe15cac67.tar.gz
libssh-97e7c95d212d97bdc24f3c2280e842cfe15cac67.tar.xz
libssh-97e7c95d212d97bdc24f3c2280e842cfe15cac67.zip
cmake: Pass _FORTIFY_SOURCE directly to the preprocessor.
Diffstat (limited to 'cmake/Modules')
-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 582ea1ca..f07a2467 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()