Skip to content

Commit

Permalink
Don't force compiler flags
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AMDmi3 committed Oct 16, 2018
1 parent 185de0a commit 962ebf8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 962ebf8

Please sign in to comment.