Skip to content

Commit

Permalink
CMake: only set "-O3 -g" defaults if CMAKE_BUILD_TYPE wasn't set at all.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jan 8, 2016
1 parent 06129f6 commit 1615b2e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Expand Up @@ -158,8 +158,10 @@ endif()

# Default flags, if not set otherwise
if("$ENV{CFLAGS}" STREQUAL "")
if(USE_GCC OR USE_CLANG)
set(CMAKE_C_FLAGS "-g -O3")
if(CMAKE_BUILD_TYPE STREQUAL "")
if(USE_GCC OR USE_CLANG)
set(CMAKE_C_FLAGS "-g -O3")
endif()
endif()
else()
set(CMAKE_C_FLAGS "$ENV{CFLAGS}")
Expand Down

0 comments on commit 1615b2e

Please sign in to comment.