-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (27 loc) · 1007 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
cmake_minimum_required(VERSION 3.17)
project(Matrix)
set(CMAKE_CXX_STANDARD 17)
add_subdirectory(
"${CMAKE_CURRENT_SOURCE_DIR}/googletest"
googletest
)
# Main target
add_executable(matrix src/BigInteger/BigInteger.cpp src/BigInteger/BigInteger.h src/Rational/Rational.cpp src/Rational/Rational.h src/Finite/Finite.hpp src/Matrix/Matrix.hpp src/Matrix/SquareMatrix.hpp main.cpp )
# Test target
add_executable(test_matrix src/BigInteger/BigInteger.cpp src/BigInteger/BigInteger.h src/Rational/Rational.cpp src/Rational/Rational.h src/Finite/Finite.hpp src/Matrix/Matrix.hpp src/Matrix/SquareMatrix.hpp tests/matrix_test.cpp)
target_include_directories(
test_matrix PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/src"
)
target_link_libraries(
test_matrix PRIVATE
gtest gtest_main
)
target_compile_options(
matrix PRIVATE
-Wall -Wextra -pedantic -Werror
)
target_compile_options(
test_matrix PRIVATE
-Wall -Wextra -pedantic -Werror
)