-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
34 lines (27 loc) · 1.06 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
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
PROJECT(DriftWaveSolver)
# Nektar++ requires C++17.
SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_EXTENSIONS OFF)
# Default install location: build/dist
IF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/dist CACHE PATH "" FORCE)
ENDIF()
# Find Nektar++
FIND_PACKAGE(Nektar++ REQUIRED)
ADD_DEFINITIONS(${NEKTAR++_DEFINITIONS})
INCLUDE_DIRECTORIES(SYSTEM ${NEKTAR++_INCLUDE_DIRS} ${NEKTAR++_TP_INCLUDE_DIRS})
LINK_DIRECTORIES(${NEKTAR++_LIBRARY_DIRS} ${NEKTAR++_TP_LIBRARY_DIRS})
MESSAGE(STATUS "Found Nektar++: version ${NEKTAR++_VERSION}")
# Set RPATH for wherever Nektar++ is installed.
SET(CMAKE_INSTALL_RPATH "${NEKTAR++_LIBRARY_DIRS}")
# Add source files.
ADD_EXECUTABLE(DriftWaveSolver
src/DriftWaveSolver.cpp
src/DriftWaveSystem.cpp
src/RogersRicci2D.cpp
)
# Add target link libraries.
TARGET_LINK_LIBRARIES(DriftWaveSolver ${NEKTAR++_LIBRARIES} ${NEKTAR++_TP_LIBRARIES})
INSTALL(TARGETS DriftWaveSolver DESTINATION ${CMAKE_INSTALL_PREFIX})