aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-08-29 21:21:17 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-08-29 21:21:17 +0200
commitaba6e34b63428dc692f3ab905c27315a0d4fe5a1 (patch)
treed125405bd4f07a9cb74f03d4612f00f0bbdafad6 /cmake
parent4fcc0bd40719c90c9fc359e91f13cf94c0faf55b (diff)
downloadlibssh-aba6e34b63428dc692f3ab905c27315a0d4fe5a1.tar.gz
libssh-aba6e34b63428dc692f3ab905c27315a0d4fe5a1.tar.xz
libssh-aba6e34b63428dc692f3ab905c27315a0d4fe5a1.zip
cmake: Fix SSP compiler flag check
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/CheckCCompilerFlagSSP.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/Modules/CheckCCompilerFlagSSP.cmake b/cmake/Modules/CheckCCompilerFlagSSP.cmake
index e421091a..ab206ca7 100644
--- a/cmake/Modules/CheckCCompilerFlagSSP.cmake
+++ b/cmake/Modules/CheckCCompilerFlagSSP.cmake
@@ -20,10 +20,10 @@
include(CheckCSourceCompiles)
macro(CHECK_C_COMPILER_FLAG_SSP _FLAG _RESULT)
- set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
- set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
+ set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
+ set(CMAKE_REQUIRED_FLAGS "${_FLAG}")
check_c_source_compiles("int main(int argc, char **argv) { char buffer[256]; return buffer[argc]=0;}" ${_RESULT})
- set(CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
+ set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
endmacro(CHECK_C_COMPILER_FLAG_SSP)