Skip to content

Commit

Permalink
cmake add an option to force shared library
Browse files Browse the repository at this point in the history
  • Loading branch information
burlen committed Aug 26, 2023
1 parent d3d8592 commit c0b2167
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@ set(tmp STATIC)
if (HAMR_SEPARATE_IMPL)
set(tmp SHARED) # because nvlink segv's during device link w/ clang
endif()
add_library(hamr ${tmp} ${hamr_sources})

set(HAMR_LIBRARY_TYPE ${tmp}
CACHE STRING "HAMR library type STATIC or SHARED")

add_library(hamr ${HAMR_LIBRARY_TYPE} ${hamr_sources})
target_link_libraries(hamr PUBLIC ${hamr_libs})

if (HAMR_ENABLE_CUDA AND HAMR_NVCC_CUDA)
Expand Down

0 comments on commit c0b2167

Please sign in to comment.