Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 680119e

Browse files
committed
cmake: force DWARF4 for gcc and clang to make valgrind happy
1 parent 8970a93 commit 680119e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

projects/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX
8787
# enable as many warnings as possible
8888
set(warning_flags "-Wall -Wextra -Wconversion")
8989

90+
# force DWARF version to 4 in order to keep Valgrind happy.
91+
set(warning_flags "${warning_flags} -gdwarf-4")
92+
9093
if (CMAKE_COMPILER_IS_GNUCXX)
9194
set(warning_flags "${warning_flags} -Wno-maybe-uninitialized")
9295
endif()
@@ -99,8 +102,6 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX
99102
# Ignore self-assigns as we need this for generated tests.
100103
set(warning_flags "${warning_flags} -Wno-self-assign-overloaded ")
101104

102-
# force DWARF version to 4 in order to keep Valgrind happy.
103-
set(warning_flags "${warning_flags} -gdwarf-4")
104105
if(CCACHE_PROGRAM)
105106
# CCache and Clang don't seem to play nice when it comes
106107
# to unused arguments.

0 commit comments

Comments
 (0)