|
|
@@ -12,11 +12,11 @@ endif() |
|
|
|
add_compile_options(-std=c++2a -Wall -Wextra -Wpedantic -Wno-unused-parameter) |
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Sanitize OR CMAKE_BUILD_TYPE STREQUAL "") |
|
|
|
message(STATUS "Build mode: Sanitize") |
|
|
|
add_compile_options(-g -fsanitize=address) |
|
|
|
add_link_options(-fsanitize=address) |
|
|
|
add_compile_options(-g -Og -fsanitize=address -fsanitize=undefined) |
|
|
|
add_link_options(-fsanitize=address -fsanitize=undefined) |
|
|
|
elseif(CMAKE_BUILD_TYPE STREQUAL Debug) |
|
|
|
message(STATUS "Build mode: Debug") |
|
|
|
add_compile_options(-g) |
|
|
|
add_compile_options(-g -Og) |
|
|
|
elseif(CMAKE_BUILD_TYPE STREQUAL Release) |
|
|
|
message(STATUS "Build mode: Release") |
|
|
|
add_compile_options(-O3 -flto) |