Browse Source

Merge branch 'master' of git.mort.coffee:mort/project-swan

opengl-renderer-broken
Martin Dørum 4 years ago
parent
commit
b6560c6c47
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      CMakeLists.txt

+ 2
- 2
CMakeLists.txt View File

@@ -7,11 +7,11 @@ add_compile_options(-std=c++17 -Wall -Wextra -Wpedantic -Wno-unused-parameter)
if(CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL "")
message(STATUS "Build mode: Debug")
add_compile_options(-g -fsanitize=address)
add_link_options(-fsanitize=address)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
message(STATUS "Build mode: Release")
add_compile_options(-O3 -flto)
add_link_options(-flto)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto")
else()
message(FATAL_ERROR "CMAKE_BUILD_TYPE must be Debug or Release.")
endif()

Loading…
Cancel
Save