forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
23 lines (21 loc) · 870 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
if(NOT CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO)
# If we are building the standalone module, we set the proper cmake variables.
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
find_package(Caffe2 REQUIRED)
set(BUILD_TEST ON)
option(BUILD_SHARED_LIBS "Build shared libs." ON)
endif()
if(BUILD_TEST AND NOT BUILD_LITE_INTERPRETER)
add_library(
caffe2_module_test_dynamic
${CMAKE_CURRENT_SOURCE_DIR}/module_test_dynamic.cc)
if(HAVE_SOVERSION)
set_target_properties(caffe2_module_test_dynamic PROPERTIES
VERSION ${TORCH_VERSION} SOVERSION ${TORCH_SOVERSION})
endif()
target_link_libraries(caffe2_module_test_dynamic torch_library)
install(TARGETS caffe2_module_test_dynamic DESTINATION lib)
if(MSVC AND BUILD_SHARED_LIBS)
install(FILES $<TARGET_PDB_FILE:caffe2_module_test_dynamic> DESTINATION lib OPTIONAL)
endif()
endif()