forked from Ovakefali13/cmake-exercise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
36 lines (26 loc) · 990 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
cmake_minimum_required(VERSION "3.8")
# name of the project and the export binary basically
project("cmake_exercise")
# for deal II ("was configured with debug release")
set(CMAKE_BUILD_TYPE Release)
# specify source files (.cpp)
add_executable(${PROJECT_NAME}
main.cpp
fem/fem.cpp
filesystem/filesystem.cpp
flatset/flatset.cpp
)
# finding necesssary (required) packages
find_package(deal.II REQUIRED)
find_package(MPI REQUIRED)
# with components we select just the necessary component
find_package(Boost REQUIRED COMPONENTS filesystem)
include_directories("${MPI_INCLUDE_PATH}")
# link binaries with libraries
target_link_libraries(${PROJECT_NAME} ${MPI_LIBRARIES})
target_link_libraries("${PROJECT_NAME}" Boost::filesystem)
# deal ii setup initialisation
DEAL_II_INITIALIZE_CACHED_VARIABLES()
DEAL_II_SETUP_TARGET(${PROJECT_NAME})
# configuring the make install configuration
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${PROJECT_SOURCE_DIR}/../build)