diff --git a/CMakeLists.txt b/CMakeLists.txt index e9cb7de..f94807f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,9 +35,8 @@ endif() add_compile_options(-fdata-sections -ffunction-sections -Wswitch-enum -Werror=switch-enum -fPIC) -add_link_options(-pie) -set(full_relro_flags "LINKER:-z,relro,-z,now,-z,noexecstack") +set(full_relro_flags "-pie LINKER:-z,relro,-z,now,-z,noexecstack") cmake_push_check_state() list(APPEND CMAKE_REQUIRED_LINK_OPTIONS ${full_relro_flags}) check_cxx_source_compiles("int main(){}" HAS_FULL_RELRO FAIL_REGEX "warning:")