Skip to content

Commit

Permalink
#1786: condition link flag on library's presence
Browse files Browse the repository at this point in the history
  • Loading branch information
stmcgovern committed May 9, 2022
1 parent 19a1056 commit 0456635
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions cmake/link_vt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ function(link_target_with_vt)
endif()

if (NOT DEFINED ARG_LINK_UNWIND AND ${ARG_DEFAULT_LINK_SET} OR ARG_LINK_UNWIND)
if (${ARG_DEBUG_LINK})
message(STATUS "link_target_with_vt: unwind=${ARG_LINK_UNWIND}")
endif()
if (NOT DEFINED APPLE)
target_link_libraries(
${ARG_TARGET} PUBLIC ${ARG_BUILD_TYPE} unwind
)
if (vt_has_libunwind_h)
if (${ARG_DEBUG_LINK})
message(STATUS "link_target_with_vt: unwind=${ARG_LINK_UNWIND}")
endif()
if (NOT DEFINED APPLE)
target_link_libraries(
${ARG_TARGET} PUBLIC ${ARG_BUILD_TYPE} unwind
)
endif()
endif()
endif()

Expand Down

0 comments on commit 0456635

Please sign in to comment.