forked from metric-space-ai/metric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
53 lines (45 loc) · 1.17 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
cmake_minimum_required(VERSION 3.10)
if (POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
endif ()
if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
project(panda_metric)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#if(UNIX)
# append(CMAKE_CXX_FLAGS
#endif(UNIX)
option(BUILD_TESTS "build tests" ON)
if(CMAKE_SYSTEM_NAME MATCHES Windows)
if(CMAKE_SYSTEM_PROCESSOR MATCHES ".*64$")
message("Build architecture: x64")
set(CMAKE_GENERATOR_PLATFORM x64)
else()
message("Build architecture: x86")
set(CMAKE_GENERATOR_PLATFORM Win32)
endif()
endif()
find_package(LAPACK)
if(NOT LAPACK_FOUND)
set(BLA_VENDOR Intel10_64lp_seq)
message("Generic LAPACK not Found, trying Intel MKL")
if(NOT BLAS_ROOT)
if(WIN32)
set(BLAS_ROOT "C:/Program\ Files\ (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64")
endif()
endif()
find_package(LAPACK QUIET)
endif()
if(MSVC)
add_definitions("/w")
endif()
find_package(Boost REQUIRED unit_test_framework)
include_directories(
${Boost_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}
)
enable_testing()
add_subdirectory(tests)
add_subdirectory(examples)