Skip to content

Commit

Permalink
Introduced new cmake option "LIBS_BUILD_CGNS_ENABLE_HDF5" for manuall…
Browse files Browse the repository at this point in the history
…y disabling the usage of HDF5 during CGNS compilation by subsequently setting -DCGNS_ENABLE_HDF5=${LIBS_BUILD_CGNS_ENABLE_HDF5} with the default value "ON".
  • Loading branch information
scopplestone committed Jan 10, 2023
1 parent 1dad2a7 commit 328dccd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeListsLib.txt
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ ELSE()
SET (CGNSDOWNLOAD ${LIBS_DLPATH}libs/cgns.git )
ENDIF()

# Fallback for disabling HDF5 for CGNS compilation
OPTION(LIBS_BUILD_CGNS_ENABLE_HDF5 "Build CGNS library with -DCGNS_ENABLE_HDF5=ON" ON)
MESSAGE(STATUS "Build CGNS library with -DCGNS_ENABLE_HDF5=" ${LIBS_BUILD_CGNS_ENABLE_HDF5})

# Build CGNS with HDF5 support
EXTERNALPROJECT_ADD(cgns
GIT_REPOSITORY ${CGNSDOWNLOAD}
Expand All @@ -435,7 +439,8 @@ ELSE()
PREFIX ${LIBS_CGNS_DIR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBS_CGNS_DIR}/build -DCMAKE_PREFIX_PATH=${LIBS_HDF5_DIR} /
-DCGNS_ENABLE_FORTRAN=ON -DCGNS_ENABLE_64BIT=${LIBS_CGNS_64BIT} -DCGNS_BUILD_SHARED=OFF -DCGNS_USE_SHARED=OFF /
-DCMAKE_BUILD_TYPE=Release -DCGNS_BUILD_CGNSTOOLS=OFF -DCGNS_ENABLE_HDF5=ON -DCGNS_ENABLE_PARALLEL=OFF -DCGNS_ENABLE_TESTS=OFF -DCMAKE_SKIP_RPATH=ON /
-DCMAKE_BUILD_TYPE=Release -DCGNS_BUILD_CGNSTOOLS=OFF -DCGNS_ENABLE_HDF5=${LIBS_BUILD_CGNS_ENABLE_HDF5} /
-DCGNS_ENABLE_PARALLEL=OFF -DCGNS_ENABLE_TESTS=OFF -DCMAKE_SKIP_RPATH=ON /
)
# If HDF5 is built in HOPR, it must occur before the CGNS compilation (for the support of HDF5-based CGNS files)
IF(LIBS_BUILD_HDF5)
Expand Down

0 comments on commit 328dccd

Please sign in to comment.