1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-29 13:01:13 +03:00

Change the test file for stackprotector for clang

Now compiles with clang !
This commit is contained in:
Aris Adamantiadis
2010-04-28 18:01:15 +02:00
parent ecbe577be3
commit cbd0a8f4b5
2 changed files with 27 additions and 1 deletions

View File

@ -1,6 +1,7 @@
# define system dependent compiler flags
include(CheckCCompilerFlag)
include(MacroCheckCCompilerFlagSSP)
if (UNIX AND NOT WIN32)
if (${CMAKE_C_COMPILER_ID} MATCHES GNU)
@ -13,7 +14,7 @@ if (UNIX AND NOT WIN32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
endif (WITH_FPIC)
check_c_compiler_flag("-fstack-protector" WITH_STACK_PROTECTOR)
check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR)
if (WITH_STACK_PROTECTOR)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
endif (WITH_STACK_PROTECTOR)