diff --git a/CMakeLists.txt b/CMakeLists.txt index 30405359b..b857d8ac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,12 +18,11 @@ OPTION(USE_TIDY "Use clang-tidy for checks" OFF) OPTION(USE_FORMAT "Use clang-format for checks" OFF) # These flags are used for all builds -set(CMAKE_C_STANDARD 11) -set(CMAKE_C_FLAGS "-Wall") -set(CMAKE_C_FLAGS_DEBUG "-ggdb -DDEBUGMODE -Werror -fno-omit-frame-pointer") -set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O2 -fno-omit-frame-pointer -DNDEBUG") -set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG") -set(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") +set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb -DDEBUGMODE -fno-omit-frame-pointer") +set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O2 -fno-omit-frame-pointer -DNDEBUG") +set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -DNDEBUG") +set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -Os -DNDEBUG") add_definitions(-DV_MAJOR=${VERSION_MAJOR} -DV_MINOR=${VERSION_MINOR} -DV_PATCH=${VERSION_PATCH}) # See if we have Git, and use it to fetch current SHA1 hash