From 4685908ead71f93e0f180979af86a646ea0f838f Mon Sep 17 00:00:00 2001 From: hagen Date: Wed, 17 Sep 2014 06:03:16 +0000 Subject: [PATCH] * use hardening linker flags only with gcc --- build/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index ea02f4a6..f41e5d5c 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -114,7 +114,7 @@ message(STATUS "---------------------------------------") add_executable ( ${PROJECT_NAME} ${SOURCES} ) -if (WITH_HARDENING) +if (WITH_HARDENING AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-z relro -z now" ) endif ()