Skip to content

Commit

Permalink
fix to make version scripts work with clang 17+
Browse files Browse the repository at this point in the history
  • Loading branch information
mnutt committed Jul 3, 2024
1 parent b93020e commit fcc031c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/cmake/OptionsQt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,11 @@ endif ()

option(USE_LINKER_VERSION_SCRIPT "Use linker script for ABI compatibility with Qt libraries" ${USE_LINKER_VERSION_SCRIPT_DEFAULT})

if (USE_LINKER_VERSION_SCRIPT AND COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14.0)
# clang 15+ is strict with version symbols; set back to old behavior
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--undefined-version")
endif ()

# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)

Expand Down

0 comments on commit fcc031c

Please sign in to comment.