diff --git a/CMakeLists.txt b/CMakeLists.txt index 0743dca48..e57762340 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,13 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) #============================================================================ project(gz-rendering7 VERSION 7.2.0) +set( CMAKE_C_FLAGS + "${CMAKE_C_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=address" ) +set( CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=address" ) +set( CMAKE_LINKER_FLAGS + "${CMAKE_LINKER_FLAGS} -fsanitize=address" ) + #============================================================================ # Find gz-cmake #============================================================================ diff --git a/ogre2/src/CMakeLists.txt b/ogre2/src/CMakeLists.txt index 92cf11b53..1046d26de 100644 --- a/ogre2/src/CMakeLists.txt +++ b/ogre2/src/CMakeLists.txt @@ -1,3 +1,10 @@ +set( CMAKE_C_FLAGS + "${CMAKE_C_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=address" ) +set( CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=address" ) +set( CMAKE_LINKER_FLAGS + "${CMAKE_LINKER_FLAGS} -fsanitize=address" ) + # Collect source files into the "sources" variable and unit test files into the # "gtest_sources" variable. gz_get_libsources_and_unittests(sources gtest_sources)