From 8af5a7eb4d48f5dd71e09f23c96593928285220e Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Wed, 29 Jun 2022 10:04:59 +0100 Subject: [PATCH] Remove -O3 from CMAKE_CXX_FLAGS_RELEASE. --- wrapper/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrapper/CMakeLists.txt b/wrapper/CMakeLists.txt index d62ea4f14..a78c8fe9e 100644 --- a/wrapper/CMakeLists.txt +++ b/wrapper/CMakeLists.txt @@ -400,8 +400,7 @@ if (APPLE) # X86 builds on MacOS as these causes crashes with boost_python if (NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") message( STATUS "Disabling '-O3' : ${CMAKE_SYSTEM_PROCESSOR}") - string( REPLACE "-O3" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ) - string( REPLACE "-O3" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ) + string( REPLACE "-O3" "" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} ) endif() endif() @@ -410,6 +409,7 @@ message( STATUS "CMAKE_C_COMPILER == ${CMAKE_C_COMPILER}" ) message( STATUS "CMAKE_CXX_COMPILER == ${CMAKE_CXX_COMPILER}" ) message( STATUS "C compiler flags == ${CMAKE_C_FLAGS}" ) message( STATUS "C++ compiler flags == ${CMAKE_CXX_FLAGS}" ) +message( STATUS "CMake release flags == ${CMAKE_CXX_FLAGS_RELEASE}" ) message( STATUS "Shared library flags == ${CMAKE_SHARED_LINKER_FLAGS}" ) message( STATUS "Static library flags == ${CMAKE_STATIC_LINKER_FLAGS}" ) message( STATUS "Executable link flags == ${CMAKE_EXE_LINKER_FLAGS}" )