Skip to content

Commit

Permalink
Link Android's log with PRIVATE visibility (#2815)
Browse files Browse the repository at this point in the history
INTERFACE should be used on dependencies from other than our source files.
PRIVATE should be used the include happens in our source files.

In this case (src/catch2/internal/catch_debug_console.cpp:20) the include
is from our source file.

I encountered a issue with this when building Catch2 for Android in
combination with BUILD_SHARED_LIBS. Changing the visibility to PRIVATE
fixes the issue.
  • Loading branch information
itacud95 authored Feb 19, 2024
1 parent 28c2f0b commit 024cfb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ endif()
add_library(Catch2::Catch2 ALIAS Catch2)

if (ANDROID)
target_link_libraries(Catch2 INTERFACE log)
target_link_libraries(Catch2 PRIVATE log)
endif()

set_target_properties(Catch2 PROPERTIES
Expand Down

0 comments on commit 024cfb3

Please sign in to comment.