-
Notifications
You must be signed in to change notification settings - Fork 54
/
CMakeLists.txt
25 lines (21 loc) · 941 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
cmake_minimum_required(VERSION 3.16)
project(kuiper_datawhale_course1)
find_package(benchmark REQUIRED)
find_package(OpenMP REQUIRED)
find_package(Armadillo REQUIRED)
find_package(glog REQUIRED)
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)
find_package(GTest REQUIRED)
set(link_lib glog::glog GTest::gtest)
if(!WIN32)
set(link_lib "${link_lib} pthread")
endif()
set(link_math_lib ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
aux_source_directory(./test DIR_TEST_ARMA)
add_executable(kuiper_datawhale_course1 course1_main.cpp ${DIR_TEST_ARMA})
target_link_libraries(kuiper_datawhale_course1 ${link_lib} ${link_math_lib} OpenMP::OpenMP_CXX)
target_include_directories(kuiper_datawhale_course1 PUBLIC ${glog_INCLUDE_DIR})
target_include_directories(kuiper_datawhale_course1 PUBLIC ${GTest_INCLUDE_DIR})
target_include_directories(kuiper_datawhale_course1 PUBLIC ${Armadillo_INCLUDE_DIR})
enable_testing()