Skip to content

Commit

Permalink
added shared object
Browse files Browse the repository at this point in the history
  • Loading branch information
cheshmi committed Mar 10, 2024
1 parent 4a81d5f commit 1f65d12
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ set(LBC_EXTERNAL ${CMAKE_CURRENT_LIST_DIR}/external/)

project(LBC_lib CXX C)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

get_directory_property(HAS_PARENT PARENT_DIRECTORY)
if(HAS_PARENT)
Expand Down Expand Up @@ -96,7 +97,7 @@ endif()

file(GLOB_RECURSE EXT_SRC ${CMAKE_CURRENT_SOURCE_DIR}/utils/external/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utils/external/*.c)
add_library(sym_amd STATIC
add_library(sym_amd SHARED
${EXT_SRC})
target_include_directories(sym_amd PRIVATE
${LBC_INC}
Expand Down
26 changes: 26 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ add_library (lbc STATIC
${SPARSE_UTIL_SRC_FILES}
)



target_include_directories(lbc PRIVATE
${LBC_INC}
)
Expand All @@ -15,6 +17,18 @@ target_link_libraries(lbc PRIVATE
metis::metis
)

add_library (lbcShared SHARED
${LBC_SRC_FILES}
${SPARSE_UTIL_SRC_FILES}
)
target_include_directories(lbcShared PRIVATE
${LBC_INC}
)

target_link_libraries(lbcShared PRIVATE
sym_amd
metis::metis
)
########## HDAGG
add_library(aggregation
${HDAGG_SRCFILES}
Expand All @@ -28,6 +42,18 @@ target_link_libraries(aggregation PRIVATE
metis::metis
)


add_library(aggregationShared
${HDAGG_SRCFILES}
)
target_include_directories(aggregationShared PRIVATE
${LBC_INC}
)
target_link_libraries(aggregationShared PRIVATE
lbcShared
sym_amd
metis::metis
)
### Find Intel MKL if available - it works with oneAPI
if(HDAGG_WITH_MKL)
find_package(MKL OPTIONAL_COMPONENTS)
Expand Down

0 comments on commit 1f65d12

Please sign in to comment.