Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 8caf653

Browse files
committed
cmake: Fix SSP compiler flag check
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit aba6e34)
1 parent 88c4d53 commit 8caf653

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmake/Modules/CheckCCompilerFlagSSP.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
include(CheckCSourceCompiles)
2121

2222
macro(CHECK_C_COMPILER_FLAG_SSP _FLAG _RESULT)
23-
set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
24-
set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
23+
set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
24+
set(CMAKE_REQUIRED_FLAGS "${_FLAG}")
2525

2626
check_c_source_compiles("int main(int argc, char **argv) { char buffer[256]; return buffer[argc]=0;}" ${_RESULT})
2727

28-
set(CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
28+
set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
2929
endmacro(CHECK_C_COMPILER_FLAG_SSP)

0 commit comments

Comments
 (0)