diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2014-11-11 19:46:07 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2014-11-11 21:48:32 +0100 |
commit | a85b594d49e2de3ede79aea425776bf60af8de14 (patch) | |
tree | 1320592aecf774ac136df38c84ca3e10cf469f73 | |
parent | 5f55f9801797df84587add38972312f1bba1db8a (diff) | |
download | yawa-a85b594d49e2de3ede79aea425776bf60af8de14.tar.xz |
CMakeLists: Enable PIE, full RELRO and stack protector
-rw-r--r-- | CMakeLists.txt | 11 | ||||
-rw-r--r-- | src/yawa.h | 1 |
2 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4058a2f..c78d423 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,19 +20,18 @@ set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_DESCRIPTION "Yet Another Wallpaper Application") set(PACKAGE_BUGREPORT "johannes@kyriasis.com") - -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") - configure_file( ${CMAKE_SOURCE_DIR}/src/config.h.in ${CMAKE_SOURCE_DIR}/src/config.h ) -set(CMAKE_C_COMPILER "clang") -set(CMAKE_C_FLAGS "-Weverything ${CMAKE_C_FLAGS}") set(CMAKE_C_STANDARD 11) +set(CMAKE_C_COMPILER "clang") +set(CMAKE_C_FLAGS "-Weverything -fstack-protector-all -fPIE ${CMAKE_C_FLAGS}") +set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,relro -Wl,-z,now -pie ${CMAKE_EXE_LINKER_FLAG}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - add_subdirectory("src") + +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") add_subdirectory("doc") @@ -15,6 +15,7 @@ typedef enum Full, Fill, Center, Tile } ImageMode; + /// Prototypes signed |