-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdependencies.cmake
49 lines (44 loc) · 1.23 KB
/
dependencies.cmake
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
40
41
42
43
44
45
46
47
48
49
# On different platforms the CMakeDeps generator in conan seems to install eigen
# as either "eigen" or "Eigen3", so we need to work around this for now.
find_package(eigen NAMES Eigen3)
if(eigen_FOUND OR Eigen3_FOUND)
if(eigen_INCLUDE_DIR)
set(EIGEN3_INCLUDE_DIR ${eigen_INCLUDE_DIR} CACHE INTERNAL "")
elseif(Eigen3_INCLUDE_DIR)
set(EIGEN3_INCLUDE_DIR ${Eigen3_INCLUDE_DIR} CACHE INTERNAL "")
endif()
else()
message(FATAL_ERROR "Eigen is required")
endif()
find_package(TIFF)
if(NOT TIFF_FOUND)
message(FATAL_ERROR "TIFF is required")
endif()
if(docs)
find_package(Doxygen REQUIRED dot)
if(NOT Doxygen_FOUND)
message(FATAL_ERROR "Could not find Doxygen or dot")
endif()
endif()
if(openmp)
find_package(OpenMP)
if(OPENMP_FOUND)
set(SOPT_DEFAULT_OPENMP_THREADS 2 CACHE STRING "Number of threads used in testing")
set(SOPT_OPENMP TRUE)
else()
message(FATAL_ERROR "OpenMP was requested but could not be found")
endif()
endif()
set(SOPT_MPI FALSE)
if(dompi)
find_package(MPI)
if(NOT MPI_FOUND)
message(FATAL_ERROR "MPI was requested but could not be found")
endif()
set(SOPT_MPI ${MPI_FOUND})
endif()
set(SOPT_ORT FALSE)
if(onnxrt)
include(LookUpONNXRT)
set(SOPT_ORT ${onnxruntime_FOUND})
endif()