forked from UNN-ITMM-Software/mp2-lab2-matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
29 lines (22 loc) · 1.2 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
cmake_minimum_required(VERSION 3.0)
set(PROJECT_NAME matrix)
project(${PROJECT_NAME} LANGUAGES CXX)
# GoogleTest requires at least C++14
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE})
add_executable(sample_matrix "./samples/sample_matrix.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/include/tmatrix.h")
#"${CMAKE_CURRENT_SOURCE_DIR}/gtest/gtest.h")
add_executable(${PROJECT_NAME}_test "./test/test_main.cpp"
"./test/test_tmatrix.cpp"
"./test/test_tvector.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/include/tmatrix.h")
set(TEST_NAME ${PROJECT_NAME}_test)
add_library(gtest "${CMAKE_CURRENT_SOURCE_DIR}/gtest/gtest-all.cc" "${CMAKE_CURRENT_SOURCE_DIR}/gtest/gtest.h")
target_link_libraries(${TEST_NAME} PUBLIC gtest)
target_include_directories(sample_matrix PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_include_directories(${TEST_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/gtest" "${CMAKE_CURRENT_SOURCE_DIR}/include")