-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
executable file
·48 lines (39 loc) · 1.49 KB
/
CMakeLists.txt
File metadata and controls
executable file
·48 lines (39 loc) · 1.49 KB
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
# Copyright David Stone 2019.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
cmake_minimum_required(VERSION 3.28 FATAL_ERROR)
project(bounded_integer LANGUAGES CXX)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type" FORCE)
endif()
enable_testing()
get_directory_property(has_parent PARENT_DIRECTORY)
if (NOT has_parent)
set(CMAKE_CXX_STANDARD 26)
set(CMAKE_CXX_STANDARD_REQUIRED On)
set(CMAKE_CXX_EXTENSIONS Off)
add_subdirectory(dependencies/cmake_strict_defaults)
add_subdirectory(dependencies/numeric-traits)
add_subdirectory(dependencies/operators)
add_subdirectory(dependencies/std_module)
add_subdirectory(dependencies/Catch2 EXCLUDE_FROM_ALL)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
target_compile_options(Catch2 PUBLIC
"-Wno-c2y-extensions"
)
endif()
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Disable testing benchmark.")
add_subdirectory(dependencies/benchmark EXCLUDE_FROM_ALL)
get_property(benchmark_include_dirs TARGET benchmark PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
set_property(TARGET benchmark PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${benchmark_include_dirs}")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
target_compile_options(benchmark PUBLIC
"-Wno-global-constructors"
"-Wno-c2y-extensions"
)
endif()
endif()
add_subdirectory(source/bounded)
add_subdirectory(source/tv)
add_subdirectory(source/containers)