forked from mortele/variational-monte-carlo-fys4411
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (41 loc) · 1.2 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
43
44
45
46
47
48
49
cmake_minimum_required(VERSION 3.25)
project(project_1_fys4411)
# Set CXX standard to C++14
set(CMAKE_CXX_STANDARD 14)
# Check if the user has specified a build type via the command line, e.g., (in the
# build-directory)
#
# $cmake .. -DCMAKE_BUILD_TYPE=Release
#
# if not, set Debug as the default build type.
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
# Add all compiler warnings. Remember, a warning in C++ can very often lead to a bug
# later on so _fix your warnings!_
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
# Add debugging flag for tools such as gdb and valgrind.
set(CMAKE_CXX_FLAGS_DEBUG "-g")
# Add full compiler optimization when in the release build type. Other options include
# -O0, -O1, -O2.
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
# Add directories containing header-files
include_directories(
.
Hamiltonians
InitialStates
Math
WaveFunctions
Solvers
)
# Add sources from all directories
file(
GLOB SOURCES "*.cpp"
GLOB SOURCES "Hamiltonians/*.cpp"
GLOB SOURCES "InitialStates/*.cpp"
GLOB SOURCES "Math/*.cpp"
GLOB SOURCES "Solvers/*.cpp"
GLOB SOURCES "WaveFunctions/*.cpp"
)
# Create executable called "vmc"
add_executable(vmc ${SOURCES})