From 9f4af5c5f1d11af231f44221fbbde3d73eb48820 Mon Sep 17 00:00:00 2001 From: bitscher Date: Sat, 27 Aug 2022 23:58:49 -0700 Subject: [PATCH] Compile Unix Public release with -O2 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9666005d..6a612861 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,11 @@ if (MSVC) message(STATUS "Using additional optimization flags for MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Oi /Ot") # enable intrinsic functions, favor speed endif() +elseif(UNIX) + if (PUBLIC_RELEASE) + message(STATUS "Compiling with -O2 optimizations") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") + endif() endif() option(ENABLE_OPENGL "Enables the OpenGL backend" ON)