Changed to use configure and not CMake for hdf5.

This commit is contained in:
Guilhem Lavaux 2023-12-06 21:21:11 +00:00
parent 7a81120977
commit 7c7ccd6f87
2 changed files with 9 additions and 10 deletions

View File

@ -96,15 +96,9 @@ if (INTERNAL_HDF5)
URL ${HDF5_URL} URL ${HDF5_URL}
URL_HASH MD5=30172c75e436d7f2180e274071a4ca97 URL_HASH MD5=30172c75e436d7f2180e274071a4ca97
DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads
CMAKE_ARGS CONFIGURE_COMMAND
-DCMAKE_INSTALL_PREFIX=${EXT_INSTALL} ${HDF5_SOURCE_DIR}/configure "CC=${CMAKE_C_COMPILER}" "CXX=${CMAKE_CXX_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS}" "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}" --prefix=${HDF5_BIN_DIR} --disable-shared --enable-cxx --enable-hl --enable-tools --with-pic
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} INSTALL_COMMAND make install
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DHDF5_BUILD_CPP_LIB=ON
-DHDF5_BUILD_TOOLS=ON
-DHDF5_BUILD_HL_LIB=ON
-DBUILD_SHARED_LIBS=OFF
-DHDF5_ENABLE_Z_LIB_SUPPORT=ON
) )
SET(cosmotool_DEPS ${cosmotool_DEPS} hdf5) SET(cosmotool_DEPS ${cosmotool_DEPS} hdf5)
SET(hdf5_built hdf5) SET(hdf5_built hdf5)
@ -207,12 +201,16 @@ if (INTERNAL_NETCDF)
ExternalProject_Add(netcdf-c++ ExternalProject_Add(netcdf-c++
DEPENDS ${hdf5_built} netcdf DEPENDS ${hdf5_built} netcdf
PREFIX ${BUILD_PREFIX}/netcdf-c++-prefix PREFIX ${BUILD_PREFIX}/netcdf-c++-prefix
DOWNLOAD_DIR ${SOURCE_PREFIX}/downloads
URL ${NETCDFCXX_URL} URL ${NETCDFCXX_URL}
CMAKE_ARGS CMAKE_ARGS
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DBUILD_SHARED_LIBS=OFF -DBUILD_SHARED_LIBS=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DHDF5_C_LIBRARY=${HDF5_C_STATIC_LIBRARY}
-DHDF5_HL_LIBRARY=${HDF5_HL_STATIC_LIBRARY}
-DHDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIRS}
-DBUILD_TESTING=OFF -DBUILD_TESTING=OFF
-DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=${NETCDF_BIN_DIR} -DCMAKE_INSTALL_PREFIX=${NETCDF_BIN_DIR}

View File

@ -157,6 +157,7 @@ const Interpolate& Interpolate::operator=(const Interpolate& a)
gsl_spline_init(spline, a.spline->x, a.spline->y, a.spline->size); gsl_spline_init(spline, a.spline->x, a.spline->y, a.spline->size);
logx = a.logx; logx = a.logx;
logy = a.logy; logy = a.logy;
return *this;
} }
double Interpolate::getMaxX() const double Interpolate::getMaxX() const