-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
40 lines (33 loc) · 1.01 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
cmake_minimum_required(VERSION 3.9)
# Set a name and a version number for your project:
project(
hpcpp
VERSION 0.0.1
LANGUAGES CXX)
# Define the minimum C++ standard that is required
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# compile abseil library
set(ABSL_PROPAGATE_CXX_STD ON)
add_subdirectory(ext/abseil-cpp)
# compile the hpcpp library
option(HPCPP_WITH_BLAS "Use a BLAS library for matrix multiplication" ON)
option(HPCPP_WITH_SIMD "Enable SIMD cpu instructions" ON)
add_subdirectory(src)
# compile the tests
include(CTest)
if(BUILD_TESTING)
add_subdirectory(ext/Catch2)
include(./ext/Catch2/contrib/Catch.cmake)
add_subdirectory(tests)
endif()
# compile the benchmarks
option(HPCPP_BUILD_BENCHMARKS "Build benchmarks" ON)
if(HPCPP_BUILD_BENCHMARKS)
set(BENCHMARK_ENABLE_TESTING OFF) # don't build google benchmark tests
add_subdirectory(ext/benchmark)
add_subdirectory(bench)
endif()
# This prints a summary of found dependencies
include(FeatureSummary)
feature_summary(WHAT ALL)