Commit 05763edb authored by pruthvi's avatar pruthvi

- modify runtime/cpu/CmakeLists to build cpu as static/shared library based on compile time flag

parent be99cb7f
......@@ -16,6 +16,12 @@
include(FindOpenMP)
if (NGRAPH_CPU_STATIC_LIB_ENABLE)
set(LIBRARY_TYPE STATIC)
else()
set(LIBRARY_TYPE SHARED)
endif()
set(SRC
cpu_backend.cpp
cpu_builder.cpp
......@@ -156,7 +162,8 @@ endif()
if (NGRAPH_CPU_ENABLE)
set(NGRAPH_CPU_DEBUGINFO_ENABLE 0 CACHE STRING "Enable debuginfo in the CPU backend")
add_library(cpu_backend SHARED ${SRC})
add_library(cpu_backend ${LIBRARY_TYPE} ${SRC})
target_compile_definitions(cpu_backend PUBLIC NGRAPH_CPU_STATIC_LIB_ENABLE)
if(NGRAPH_LIB_VERSIONING_ENABLE)
set_target_properties(cpu_backend PROPERTIES
VERSION ${NGRAPH_VERSION}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment