Skip to content

Commit

Permalink
Explicit PUBLIC/PRIVATE in LINK_LIBRARY. (#186)
Browse files Browse the repository at this point in the history
Repeated instructions for the same target rquire to have an explicit
PUBLIC/PRIVATE indication.

Co-authored-by: Antoine Laudrain <[email protected]>
  • Loading branch information
alaudrain and Antoine Laudrain authored Jan 15, 2024
1 parent 0de7654 commit 15f42ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ target_include_directories(lcio PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

TARGET_LINK_LIBRARIES( lcio ${CMAKE_THREAD_LIBS_INIT} )
TARGET_LINK_LIBRARIES( lcio PUBLIC ${CMAKE_THREAD_LIBS_INIT} )
TARGET_LINK_LIBRARIES( lcio PRIVATE SIO::sio )

ADD_CUSTOM_TARGET( lib DEPENDS lcio )
Expand Down Expand Up @@ -443,7 +443,7 @@ MACRO( ADD_LCIO_EXAMPLE file )
ADD_DEPENDENCIES( examples bin_${file} )
#MESSAGE( STATUS "ADD_LCIO_EXAMPLE: ${file} ./src/EXAMPLE/${file}.cc" )
SET_TARGET_PROPERTIES( bin_${file} PROPERTIES OUTPUT_NAME ${file} )
TARGET_LINK_LIBRARIES( bin_${file} lcio )
TARGET_LINK_LIBRARIES( bin_${file} PRIVATE lcio )
INSTALL( TARGETS bin_${file} DESTINATION "${CMAKE_INSTALL_BINDIR}" )
ENDMACRO()

Expand All @@ -468,7 +468,7 @@ ADD_LCIO_EXAMPLE( lcio_parallel_processing )

IF( BUILD_ROOTDICT )
ADD_LCIO_EXAMPLE( lcio_io_benchmark )
TARGET_LINK_LIBRARIES( bin_lcio_io_benchmark ${ROOT_LIBRARIES} )
TARGET_LINK_LIBRARIES( bin_lcio_io_benchmark PRIVATE ${ROOT_LIBRARIES} )
ENDIF()

IF( BUILD_LCIO_EXAMPLES )
Expand Down

0 comments on commit 15f42ed

Please sign in to comment.