-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
37 lines (29 loc) · 948 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
36
37
# Set minimum CMake version
cmake_minimum_required(VERSION 3.14)
# Set project name
project(n_body)
# Set C++ version
set(CMAKE_CXX_STANDARD 20)
# todo: somehow this is actually slower? -fassociative-math would be nice, but it's not in LLVM
#set(CMAKE_CXX_FLAGS_RELEASE "-Ofast")
# todo: this is slower, too?
#set(CMAKE_CXX_FLAGS_RELEASE "-march=native")
#set(CMAKE_CXX_FLAGS_RELEASE "-ffast-math")
#set(CMAKE_CXX_FLAGS_RELEASE "-funsafe-math-optimizations")
#set(CMAKE_CXX_FLAGS_RELEASE "-Wall -Wextra")
# Make sure catch is present
find_package(Catch2 3.1.0)
if(NOT Catch2_FOUND)
include(FetchContent)
FetchContent_Declare(
Catch2
GIT_SHALLOW TRUE
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.4.0
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(Catch2)
endif()
# Include our targets
add_subdirectory(src)
#add_subdirectory(docs)