diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-06 01:22:41 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-06 01:22:41 +0200 |
commit | 4aadd45c4e32a7793d59f013df0e5037641442d6 (patch) | |
tree | c9e53519e1740c4576c69e369456d6c1bee8882a /src | |
parent | test: try mitigating port clashes (diff) | |
download | cimple-4aadd45c4e32a7793d59f013df0e5037641442d6.tar.gz cimple-4aadd45c4e32a7793d59f013df0e5037641442d6.zip |
cmake: fix Valgrind runs with Clang builds
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5413976..6b9cddf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,6 +5,12 @@ add_compile_options(-std=c17 -Wpedantic -Wall -Wextra $<$<NOT:$<CONFIG:Debug>>:- # any features macros defined at all, and prepare to be amazed! add_compile_definitions(_GNU_SOURCE) +# Valgrind on Ubuntu Focal doesn't like DWARF version 5 debug info generated +# by Clang 14. +if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") + add_compile_options(-fdebug-default-version=4) +endif() + execute_process( COMMAND git rev-parse --verify HEAD WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" |