Files
concrete/compiler/lib/Runtime/CMakeLists.txt
Ayoub Benaissa 6a5e65631c chore: update concrete-ffi version
no major breaking changes, just enhancements
check https://github.com/zama-ai/concrete-core/releases
2022-10-06 12:48:17 +01:00

48 lines
1.1 KiB
CMake

add_library(ConcretelangRuntime SHARED
context.cpp
wrappers.cpp
AsyncOffload.cpp
DFRuntime.cpp
seeder.cpp
)
if(CONCRETELANG_DATAFLOW_EXECUTION_ENABLED)
target_link_libraries(
ConcretelangRuntime
PRIVATE
HPX::hpx HPX::iostreams_component
)
set_source_files_properties(
DFRuntime.cpp
PROPERTIES COMPILE_FLAGS "-fopenmp"
)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_libraries(ConcretelangRuntime PUBLIC omp)
else()
target_link_libraries(ConcretelangRuntime PUBLIC -Wl,--no-as-needed omp)
endif()
# Required to link with Concrete
if(APPLE)
find_library(SECURITY_FRAMEWORK Security)
if (NOT SECURITY_FRAMEWORK)
message(FATAL_ERROR "Security framework not found")
endif()
target_link_libraries(ConcretelangRuntime LINK_PUBLIC ${SECURITY_FRAMEWORK})
endif()
target_link_libraries(
ConcretelangRuntime
PUBLIC
Concrete
ConcretelangClientLib
pthread m dl
$<TARGET_OBJECTS:mlir_c_runner_utils>
)
install(TARGETS ConcretelangRuntime omp EXPORT ConcretelangRuntime)
install(EXPORT ConcretelangRuntime DESTINATION "./")