From 9b9ea6e6d0c218e726763946719d79b1322ee460 Mon Sep 17 00:00:00 2001 From: Rick V Date: Wed, 16 Oct 2019 23:14:03 -0500 Subject: [PATCH] make that a universal rule --- CMakeLists.txt | 3 +++ cmake/static_link_runtime.cmake | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) 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")