@@ -237,7 +237,6 @@ set_package_properties(
237
237
# Check for MPI
238
238
find_package (MPI 3 REQUIRED)
239
239
240
- find_package (spdlog REQUIRED)
241
240
# ------------------------------------------------------------------------------
242
241
# Compiler flags
243
242
@@ -290,8 +289,8 @@ endif()
290
289
# ------------------------------------------------------------------------------
291
290
# Find required packages
292
291
293
- # pugixml
294
292
find_package (pugixml REQUIRED)
293
+ find_package (spdlog REQUIRED)
295
294
296
295
# Note: When updating Boost version, also update DOLFINXConfig.cmake.in
297
296
if (DEFINED ENV{BOOST_ROOT} OR DEFINED BOOST_ROOT)
@@ -464,29 +463,31 @@ elseif(_REQUIRE_SLEPC AND NOT PETSC_FOUND)
464
463
)
465
464
endif ()
466
465
467
- if (DOLFINX_ENABLE_SCOTCH)
466
+ if (DOLFINX_ENABLE_SCOTCH AND _REQUIRE_SCOTCH)
467
+ find_package (
468
+ SCOTCH REQUIRED CONFIG HINTS $ENV{PETSC_DIR} /$ENV{PETSC_ARCH}
469
+ $ENV{PETSC_DIR}
470
+ )
471
+ elseif (DOLFINX_ENABLE_SCOTCH)
468
472
find_package (
469
473
SCOTCH CONFIG HINTS $ENV{PETSC_DIR} /$ENV{PETSC_ARCH} $ENV{PETSC_DIR}
470
474
)
471
- if (TARGET SCOTCH::scotch AND NOT TARGET SCOTCH::ptscotch)
472
- message (
473
- STATUS "SCOTCH found, but not PT-SCOTCH (parallel). Not enabling SCOTCH."
474
- )
475
- set (SCOTCH_FOUND FALSE )
476
- endif ()
475
+ endif ()
477
476
478
- if (SCOTCH_FOUND)
479
- message (
480
- STATUS
481
- "Found PT-SCOTCH version ${SCOTCH_VERSION} , include dir: ${SCOTCH_INCLUDE_DIR} , lib dir: ${SCOTCH_LIBRARY_DIR} "
482
- )
477
+ if (TARGET SCOTCH::scotch AND NOT TARGET SCOTCH::ptscotch)
478
+ message (
479
+ STATUS "SCOTCH found, but not PT-SCOTCH (parallel). Not enabling SCOTCH."
480
+ )
481
+ set (SCOTCH_FOUND FALSE )
482
+ if (_REQUIRE_SCOTCH AND NOT SCOTCH_FOUND)
483
+ message (FATAL_ERROR "SCOTCH requested, but not found." )
483
484
endif ()
484
485
endif ()
485
486
486
- if (_REQUIRE_SCOTCH AND NOT SCOTCH_FOUND)
487
+ if (SCOTCH_FOUND)
487
488
message (
488
- FATAL_ERROR
489
- "SCOTCH requested, but not found. "
489
+ STATUS
490
+ "Found PT- SCOTCH version ${SCOTCH_VERSION} , include dir: ${SCOTCH_INCLUDE_DIR} , lib dir: ${SCOTCH_LIBRARY_DIR} "
490
491
)
491
492
endif ()
492
493
0 commit comments