Debian Codegraph @

examples/step-87/CMakeLists.txt

raw
1 ##
2 # CMake script
3 ##
4
5 # Set the name of the project and target:
6 set(TARGET "step-87")
7
8 # Declare all source files the target consists of. Here, this is only
9 # the one step-X.cc file, but as you expand your project you may wish
10 # to add other source files as well. If your project becomes much larger,
11 # you may want to either replace the following statement by something like
12 # file(GLOB_RECURSE TARGET_SRC "source/*.cc")
13 # file(GLOB_RECURSE TARGET_INC "include/*.h")
14 # set(TARGET_SRC ${TARGET_SRC} ${TARGET_INC})
15 # or switch altogether to the large project CMakeLists.txt file discussed
16 # in the "CMake in user projects" page accessible from the "User info"
17 # page of the documentation.
18 set(TARGET_SRC
19 ${TARGET}.cc
20 )
21
22 # Usually, you will not need to modify anything beyond this point...
23
24 cmake_minimum_required(VERSION 3.13.4)
25
26 find_package(deal.II 9.7.0
27 HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
28 )
29 if(NOT ${deal.II_FOUND})
30 message(FATAL_ERROR "\n"
31 "*** Could not locate a (sufficiently recent) version of deal.II. ***\n\n"
32 "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake\n"
33 "or set an environment variable \"DEAL_II_DIR\" that contains this path."
34 )
35 endif()
36
37 #
38 # Are all dependencies fulfilled?
39 #
40 if(NOT DEAL_II_WITH_MPI)
41 message(FATAL_ERROR "
42 Error! This tutorial requires a deal.II library that was configured with the following option:
43 DEAL_II_WITH_MPI = ON
44 However, the deal.II library found at ${DEAL_II_PATH} was configured with these options:
45 DEAL_II_WITH_MPI = ${DEAL_II_WITH_MPI}
46 This conflicts with the requirements."
47 )
48 endif()
49
50
51 deal_ii_initialize_cached_variables()
52 set(CLEAN_UP_FILES *.log *.gmv *.gnuplot *.gpl *.eps *.pov *.ucd *.d2 *.vtu *.pvtu)
53 project(${TARGET})
54 deal_ii_invoke_autopilot()