-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (29 loc) · 872 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(libtorch_owndataset VERSION 0.1 LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
find_package(Torch QUIET PATHS "${CMAKE_SOURCE_DIR}/libtorch")
set(EXECUTABLE_NAME owndatabin)
#meine libs:
add_library(
owndata
"${CMAKE_SOURCE_DIR}/include/owndata.hpp"
"${CMAKE_SOURCE_DIR}/src/owndata.cpp"
)
add_library(
csv2vector
"${CMAKE_SOURCE_DIR}/include/csv2vector.hpp"
"${CMAKE_SOURCE_DIR}/src/csv2vector.cpp"
)
add_executable(${EXECUTABLE_NAME})
target_sources(${EXECUTABLE_NAME} PRIVATE main.cpp)
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
CXX_STANDARD 20
CXX_STANDARD_REQUIRED YES
)
target_link_libraries(${EXECUTABLE_NAME} "${TORCH_LIBRARIES}"
owndata
csv2vector)
if(MSVC)
include(copy_torch_dlls)
copy_torch_dlls(${EXECUTABLE_NAME})
endif(MSVC)