Skip to content
Snippets Groups Projects
Commit f1f57d35 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

Merge project-template (automated)

parents 888205fa 71759103
No related branches found
No related tags found
1 merge request!16update project template
This diff is collapsed.
#######################################################################################################################
# ######################################################################################################################
# set_default_flags.cmake
#
# Set default compiler flags for C++, including the flags for thelatest C++ standard (see
......@@ -7,9 +7,9 @@
# It will also append ${PROJECT_NAME}_CXX_FLAGS to the CMAKE_CXX_FLAGS, so it is a good idea to set any project
# specific flags before calling this macro.
#
#######################################################################################################################
# ######################################################################################################################
#######################################################################################################################
# ######################################################################################################################
#
# IMPORTANT NOTE:
#
......@@ -19,7 +19,7 @@
# If you have modified this file inside a project despite this warning, make sure to cherry-pick all your changes
# into the project-template repository immediately.
#
#######################################################################################################################
# ######################################################################################################################
include(cmake/enable_latest_cxx_support.cmake)
......@@ -29,7 +29,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O3 -g")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0")
set(CMAKE_CXX_FLAGS_TSAN "${CMAKE_CXX_FLAGS} -g -O1 -fsanitize=thread -fno-inline")
set(CMAKE_CXX_FLAGS_ASAN "${CMAKE_CXX_FLAGS} -g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=leak")
set(CMAKE_CXX_FLAGS_ASAN "${CMAKE_CXX_FLAGS} -g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=leak -fno-inline -fno-omit-frame-pointer")
add_compile_definitions("$<$<CONFIG:Debug>:_GLIBCXX_ASSERTIONS>")
......@@ -38,8 +38,7 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O3 -g")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0")
set(CMAKE_C_FLAGS_TSAN "${CMAKE_C_FLAGS} -g -O1 -fsanitize=thread -fno-inline")
set(CMAKE_C_FLAGS_ASAN "${CMAKE_C_FLAGS} -g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=leak")
set(CMAKE_C_FLAGS_ASAN "${CMAKE_C_FLAGS} -g -O0 -fsanitize=address -fsanitize=undefined -fsanitize=leak -fsanitize=leak -fno-inline -fno-omit-frame-pointer")
# Make sure any non-standard library path are added in library or executable targets.
# Since this in done only at install time, behavior of unit tests is not affected.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment