Skip to content

Commit

Permalink
Added Shared option
Browse files Browse the repository at this point in the history
  • Loading branch information
nindanaoto committed Apr 18, 2023
1 parent 1b4e2b2 commit b179715
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ option(ENABLE_BENCHMARK "Build benchmarks" OFF)
option(ENABLE_TUTORIAL "Build tutorial" OFF)
option(USE_PERF "Use Google Profiler" OFF)

option(ENABLE_SHARED "Build as shared libraries" OFF)

if(USE_RANDEN)
add_compile_definitions(USE_RANDEN)
endif()
Expand Down
7 changes: 6 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
file(GLOB tfhe++_sources "*.cpp")

add_library(tfhe++ ${tfhe++_sources})
if(ENABLE_SHARED)
add_library(tfhe++ SHARED ${tfhe++_sources})
else()
add_library(tfhe++ STATIC ${tfhe++_sources})
endif()

target_include_directories(
tfhe++
PUBLIC
Expand Down
6 changes: 5 additions & 1 deletion thirdparties/spqlios/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ endif()

set(SPQLIOS_HEADERS fft_processor_spqlios.h)

add_library(spqlios STATIC ${SRCS_FMA} ${SPQLIOS_HEADERS})
if(ENABLE_SHARED)
add_library(spqlios SHARED ${SRCS_FMA} ${SPQLIOS_HEADERS})
else()
add_library(spqlios STATIC ${SRCS_FMA} ${SPQLIOS_HEADERS})
endif()

target_include_directories(spqlios PUBLIC ${PROJECT_SOURCE_DIR}/include)

0 comments on commit b179715

Please sign in to comment.