diff options
author | Alex Richardson <arichardson.kde@gmail.com> | 2022-03-19 17:56:54 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2022-03-24 22:00:06 +0000 |
commit | 1a8fd7a3820d193d1132bc4c84317348799181ff (patch) | |
tree | 701752877b1948380e4623497a7776bff395f64e /CMakeLists.txt | |
parent | 8757c7d8d8bee261071e80014e031fdf0701dfa9 (diff) | |
download | dbus-1a8fd7a3820d193d1132bc4c84317348799181ff.tar.gz |
cmake: Only pass -Wl,--export-dynamic when linking
Otherwise we get the following warnings when building .o files with Clang:
clang-13: warning: -Wl,--export-dynamic: 'linker' input unused [-Wunused-command-line-argument]
This is required to allow the -Werror build to pass on FreeBSD.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 66590792..2eb4b52c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -377,8 +377,8 @@ endif() if(UNIX AND NOT DBUS_DISABLE_ASSERT) # required for backtrace - string(APPEND CMAKE_C_FLAGS_DEBUG " -Wl,--export-dynamic") - string(APPEND CMAKE_CXX_FLAGS_DEBUG " -Wl,--export-dynamic") + string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Wl,--export-dynamic") + string(APPEND CMAKE_EXE_LINKER_FLAGS " -Wl,--export-dynamic") set(DBUS_BUILT_R_DYNAMIC 1) endif() |