diff --git a/CMakeLists.txt b/CMakeLists.txt index 78e12c148..73ec310f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,9 @@ set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_EXTENSIONS OFF) +# this is messing with release builds +add_compile_options(-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0) + if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND SHADOW) message( FATAL_ERROR "shadow-framework is Linux only" ) endif(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND SHADOW) diff --git a/cmake/static_link_runtime.cmake b/cmake/static_link_runtime.cmake index def79f1db..0e8559025 100644 --- a/cmake/static_link_runtime.cmake +++ b/cmake/static_link_runtime.cmake @@ -26,8 +26,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() if(NOT CMAKE_CROSSCOMPILING) - # this is messing with release builds - add_compile_options(-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0) set(CMAKE_AR "gcc-ar") set(CMAKE_C_ARCHIVE_CREATE " qcs ") set(CMAKE_C_ARCHIVE_FINISH "true")