-
Notifications
You must be signed in to change notification settings - Fork 68
/
CMakeLists.txt
42 lines (36 loc) · 1.43 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
cmake_minimum_required(VERSION 3.12)
project(decimal_for_cpp)
include(CTest)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard version to use (default is 11)")
#set(CMAKE_CXX_STANDARD 98)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(BUILD_TESTING)
find_package(Boost COMPONENTS unit_test_framework REQUIRED)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS} include)
add_executable(test_runner include/decimal.h
tests/runner.cpp
tests/decimalTest.cpp
tests/decimalTestAbout.cpp
tests/decimalTestArithmetic.cpp
tests/decimalTestDiv.cpp
tests/decimalTestEdgeCases.cpp
tests/decimalTestModulo.cpp
tests/decimalTestMult.cpp
tests/decimalTestMultDiv.cpp
tests/decimalTestRounding.cpp
tests/decimalTestRoundOth.cpp
tests/decimalTestString.cpp
tests/decimalTestTypeLevel.cpp
tests/decimalTestUtils.cpp
tests/decimalTestWithExponent.cpp
tests/decimalTestUtils.h)
target_include_directories(test_runner PRIVATE ${BOOST_INCLUDE_DIRS})
endif()
enable_testing()
add_test(test_runner test_runner)
endif()
install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")