Skip to content

Commit 9e89a1d

Browse files
committed
[cmake] switch to standard deal.II finding method
closes #20
1 parent e751888 commit 9e89a1d

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,18 @@ set(CMAKE_CXX_STANDARD 17 CACHE STRING "")
66
project(pymor_dealii)
77

88
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/lib)
9-
INCLUDE(dealii_macro)
9+
10+
FIND_PACKAGE(deal.II 9.3
11+
HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
12+
)
13+
IF(NOT ${deal.II_FOUND})
14+
MESSAGE(FATAL_ERROR "\n"
15+
"*** Could not locate deal.II. ***\n\n"
16+
"You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake\n"
17+
"or set an environment variable \"DEAL_II_DIR\" that contains this path."
18+
)
19+
ENDIF()
20+
1021
# Set a default build configuration if none is specified. 'MinSizeRel' produces the smallest binaries
1122
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
1223
message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")

lib/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
cmake_minimum_required(VERSION 2.8.12)
22
add_subdirectory(pybind11)
33

4-
FIND_PACKAGE(deal.II 9.2 HINTS ${deal.II_DIR} ${DEAL_II_DIR} CONFIG REQUIRED)
54
INCLUDE(dealii_macro)
65
DEAL_II_INITIALIZE_CACHED_VARIABLES()
76

0 commit comments

Comments
 (0)