Skip to content

Commit

Permalink
lunwind isn't needed or found on some platforms when building with Cl…
Browse files Browse the repository at this point in the history
…ang (is it always needed when using libc++, and not otherwise?)
  • Loading branch information
chriselrod committed Oct 30, 2023
1 parent e8d7906 commit aef753d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(((USE_SANITIZER MATCHES "([Aa]ddress)") OR (USE_SANITIZER MATCHES "([Aa]ddress);([Uu]ndefined)"))
AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lunwind -Wno-unused-command-line-argument")
find_library(LUNWIND_LIB lunwind)
if(LUNWIND_LIB)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lunwind -Wno-unused-command-line-argument")
endif()
endif()

CPMAddPackage(
Expand Down

0 comments on commit aef753d

Please sign in to comment.