Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Add all dependent libraries to mlsl linkage interface (#2501)
Browse files Browse the repository at this point in the history
* Add all dependent libraries to mlsl linkage interface

* Use ${CMAKE_SHARED_LIBRARY_PREFIX} and ${CMAKE_SHARED_LIBRARY_SUFFIX}
  • Loading branch information
Aleksey Marchuk authored and diyessi committed Feb 28, 2019
1 parent 2a7e409 commit 9571497
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cmake/external_mlsl.cmake
Expand Up @@ -43,12 +43,17 @@ ExternalProject_Add(
EXCLUDE_FROM_ALL TRUE
)

add_library(libmlsl INTERFACE)
ExternalProject_Get_Property(MLSL SOURCE_DIR)
ExternalProject_Get_Property(MLSL INSTALL_DIR)
add_library(libmlsl INTERFACE)
target_include_directories(libmlsl SYSTEM INTERFACE ${SOURCE_DIR}/include)
target_link_libraries(libmlsl INTERFACE ${INSTALL_DIR}/intel64/lib/thread/libmlsl.so)
link_directories(${INSTALL_DIR}/intel64/lib/thread)

set(MLSL_LINK_LIBRARIES
${INSTALL_DIR}/intel64/lib/thread/${CMAKE_SHARED_LIBRARY_PREFIX}mlsl${CMAKE_SHARED_LIBRARY_SUFFIX}
${INSTALL_DIR}/intel64/lib/thread/${CMAKE_SHARED_LIBRARY_PREFIX}mpi${CMAKE_SHARED_LIBRARY_SUFFIX}
${INSTALL_DIR}/intel64/lib/thread/${CMAKE_SHARED_LIBRARY_PREFIX}fabric${CMAKE_SHARED_LIBRARY_SUFFIX})

target_link_libraries(libmlsl PRIVATE INTERFACE ${MLSL_LINK_LIBRARIES})
add_dependencies(libmlsl MLSL)

#installation
Expand Down

0 comments on commit 9571497

Please sign in to comment.