Skip to content
Snippets Groups Projects
Commit cbaa3050 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Fix targets configuration when PETSc or SLEPc are not installed

parent f5b4286e
No related branches found
No related tags found
No related merge requests found
......@@ -178,6 +178,7 @@ if (PUGS_ENABLE_PETSC MATCHES "^(AUTO|ON)$")
# PETSc support is deactivated if MPI is not found
pkg_check_modules(PETSC IMPORTED_TARGET GLOBAL PETSc)
if (${PETSC_FOUND})
set_property(TARGET PkgConfig::PETSC PROPERTY
IMPORTED_LOCATION "${PETSC_LIBRARIES}"
)
......@@ -186,6 +187,7 @@ if (PUGS_ENABLE_PETSC MATCHES "^(AUTO|ON)$")
)
set(PETSC_TARGET PkgConfig::PETSC)
endif()
else()
message(STATUS "PETSc support is deactivated since pugs will not be build with MPI support")
set(PETSC_FOUND FALSE)
......@@ -215,6 +217,7 @@ if (PUGS_ENABLE_SLEPC MATCHES "^(AUTO|ON)$")
# SLEPc support is deactivated if PETSc is not found
pkg_check_modules(SLEPC IMPORTED_TARGET GLOBAL SLEPc)
if (${SLEPC_FOUND})
set_property(TARGET PkgConfig::SLEPC PROPERTY
IMPORTED_LOCATION "${SLEPC_LIBRARIES}"
)
......@@ -223,6 +226,7 @@ if (PUGS_ENABLE_SLEPC MATCHES "^(AUTO|ON)$")
)
set(SLEPC_TARGET PkgConfig::SLEPC)
endif()
else()
message(STATUS "SLEPc support is deactivated since pugs will not be build with PETSc support")
set(SLEPC_FOUND FALSE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment