Remove overrides of default CMake flags

CMake sets these flags to sane defaults depending on which compiler
you're using, so overriding them isn't very nice.

For example:

with g++, I get
-- Debug: -g
-- RelWithDebInfo: -O2 -g -DNDEBUG
-- MinSizeRel: -O2 -g -DNDEBUG
-- Release: -O3 -DNDEBUG

and with MSVC you get something like
-- Debug: /MDd /Zi /Ob0 /Od /RTC1
-- RelWithDebInfo: /MD /Zi /O2 /Ob1 /DNDEBUG
-- MinSizeRel: /MD /Zi /O2 /Ob1 /DNDEBUG
-- Release: /MD /O2 /Ob2 /DNDEBUG
This commit is contained in:
Robin Linden 2019-11-08 00:08:20 +01:00 committed by ridiculousfish
parent 8aaccf1587
commit 34e06c4440

View File

@ -11,9 +11,6 @@ PROJECT(fish)
# We are C++11.
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
SET(DEFAULT_BUILD_TYPE "RelWithDebInfo")
IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)