-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
74 lines (65 loc) · 1.37 KB
/
CMakeLists.txt
File metadata and controls
74 lines (65 loc) · 1.37 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 3.28)
project(cfd26)
set(CMAKE_CXX_STANDARD 20)
include(FetchContent)
add_compile_options(
# $<$<CONFIG:Release>:-Werror> $<$<CONFIG:Debug>:-Wno-error> $<$<CONFIG:RelWithDebInfo>:-Werror>
-Werror
-Wall
-Wextra
-Wpedantic
-Wconversion
-Wunused-const-variable
-Wduplicated-cond
-Wnon-virtual-dtor
-Woverloaded-virtual
-Wredundant-decls
-Wsign-promo
-Wzero-as-null-pointer-constant
-Wsuggest-override
-Wshadow
-Wfloat-equal
-Wcast-qual
-Wlogical-op
-Wcast-align
# -Wold-style-cast
-Wmissing-field-initializers
)
# Boost search paths
find_package(
Boost
REQUIRED
)
# libformat
find_package(
fmt
REQUIRED
)
# Catch framework
find_package(
Catch2
REQUIRED
)
# ------ amgcl
FetchContent_Declare(
amgcl
GIT_REPOSITORY https://github.com/ddemidov/amgcl
GIT_TAG 1.4.2
)
FetchContent_GetProperties(amgcl)
if(NOT
amgcl_POPULATED
)
FetchContent_Populate(amgcl)
endif()
include_directories(
SYSTEM
${amgcl_SOURCE_DIR}
)
# build all binaries to build/bin
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories(${Boost_INCLUDE_DIRS})
add_subdirectory(src)