Skip to content

Commit 962ebf8

Browse files
authored
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.
1 parent 185de0a commit 962ebf8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,6 @@ IF(WINDOWS)
221221
SET(CMAKE_EXE_LINKER_FLAGS "-static -static-libgcc -static-libstdc++")
222222
ENDIF(WINDOWS)
223223

224-
# by default, cmake should create only 'release' build with optimization and without debug routines
225-
ADD_DEFINITIONS(-DNDEBUG)
226-
ADD_DEFINITIONS(-O2)
227-
228-
229224
IF(WINDOWS)
230225
# WIN32 - suppress terminal
231226
ADD_EXECUTABLE(astromenace WIN32 ${astromenace_SRCS})

0 commit comments

Comments
 (0)