Merge branch 'detect-FFTW-HDF5' into 'development'

detecting HDF5 and FFTW

See merge request damask/DAMASK!558
This commit is contained in:
Martin Diehl 2022-04-10 10:53:10 +00:00
commit a4c396949b
1 changed files with 7 additions and 1 deletions

View File

@ -9,7 +9,7 @@ endif()
# Dummy project to determine compiler names and version
project(Prerequisites LANGUAGES)
set(ENV{PKG_CONFIG_PATH} "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/lib/pkgconfig")
set(ENV{PKG_CONFIG_PATH} "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
pkg_check_modules(PETSC_MIN REQUIRED PETSc>=3.12.0 QUIET) #CMake does not support version range
pkg_check_modules(PETSC REQUIRED PETSc<3.18.0)
@ -27,6 +27,12 @@ else()
endif()
add_definitions("-D${DAMASK_SOLVER}")
# EXPERIMENTAL: This might help to detect HDF5 and FFTW3 in the future if PETSc is not aware of them
set(ENV{PKG_CONFIG_PATH} "$ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/externalpackages:$ENV{PKG_CONFIG_PATH}")
message($ENV{PKG_CONFIG_PATH})
pkg_check_modules(HDF5 hdf5)
pkg_check_modules(FFTW3 fftw3)
file(STRINGS ${PROJECT_SOURCE_DIR}/VERSION DAMASK_VERSION)
message("\nBuilding ${CMAKE_PROJECT_NAME} ${DAMASK_VERSION}\n")