From 962ebf85138a3d05266d762849cf2badb2501b36 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Tue, 16 Oct 2018 19:03:17 +0300 Subject: [PATCH] Don't force compiler flags Applications generally may not override optimization and debug flags, which may be provided by the environment. Forcing -O2 and -DNODEBUG also disallows debug builds unconditionally. CMake has build types (`cmake -DCMAKE_BUILD_TYPE=Release/Debug`) to handle this. --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fa2716fd..6691f95b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,11 +221,6 @@ IF(WINDOWS) SET(CMAKE_EXE_LINKER_FLAGS "-static -static-libgcc -static-libstdc++") ENDIF(WINDOWS) -# by default, cmake should create only 'release' build with optimization and without debug routines -ADD_DEFINITIONS(-DNDEBUG) -ADD_DEFINITIONS(-O2) - - IF(WINDOWS) # WIN32 - suppress terminal ADD_EXECUTABLE(astromenace WIN32 ${astromenace_SRCS})