Harden build procedure

This commit is contained in:
Guilhem Lavaux 2020-09-29 15:56:52 +02:00
parent 06b9b2291e
commit 47f2e247e9
2 changed files with 13 additions and 7 deletions

View File

@ -54,7 +54,7 @@ IF(YORICK_SUPPORT)
ENDIF((EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4") OR (INTERNAL_NETCDF)) ENDIF((EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4") OR (INTERNAL_NETCDF))
ENDIF(YORICK_SUPPORT) ENDIF(YORICK_SUPPORT)
find_program(CYTHON cython3 cython) find_program(CYTHON NAMES cython3 cython)
find_library(ZLIB_LIBRARY z) find_library(ZLIB_LIBRARY z)
find_library(DL_LIBRARY dl) find_library(DL_LIBRARY dl)
find_library(MATH_LIBRARY m) find_library(MATH_LIBRARY m)

View File

@ -2,8 +2,8 @@ include(FindOpenMP)
OPTION(ENABLE_OPENMP "Set to Yes if Healpix and/or you need openMP" OFF) OPTION(ENABLE_OPENMP "Set to Yes if Healpix and/or you need openMP" OFF)
SET(FFTW_URL "http://www.fftw.org/fftw-3.3.3.tar.gz" CACHE URL "URL to download FFTW from") SET(FFTW_URL "http://www.fftw.org/fftw-3.3.3.tar.gz" CACHE STRING "URL to download FFTW from")
SET(EIGEN_URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.bz2" CACHE URL "URL to download Eigen from") SET(EIGEN_URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.bz2" CACHE STRING "URL to download Eigen from")
SET(GENGETOPT_URL "ftp://ftp.gnu.org/gnu/gengetopt/gengetopt-2.22.5.tar.gz" CACHE STRING "URL to download gengetopt from") SET(GENGETOPT_URL "ftp://ftp.gnu.org/gnu/gengetopt/gengetopt-2.22.5.tar.gz" CACHE STRING "URL to download gengetopt from")
SET(HDF5_URL "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.18/src/hdf5-1.8.18.tar.bz2" CACHE STRING "URL to download HDF5 from") SET(HDF5_URL "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.18/src/hdf5-1.8.18.tar.bz2" CACHE STRING "URL to download HDF5 from")
SET(NETCDF_URL "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.5.0.tar.gz" CACHE STRING "URL to download NetCDF from") SET(NETCDF_URL "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.5.0.tar.gz" CACHE STRING "URL to download NetCDF from")
@ -291,13 +291,19 @@ IF(INTERNAL_GSL)
set(GSL_LIBRARIES ${GSL_LIBRARY} ${GSLCBLAS_LIBRARY}) set(GSL_LIBRARIES ${GSL_LIBRARY} ${GSLCBLAS_LIBRARY})
SET(cosmotool_DEPS ${cosmotool_DEPS} gsl) SET(cosmotool_DEPS ${cosmotool_DEPS} gsl)
ELSE(INTERNAL_GSL) ELSE(INTERNAL_GSL)
find_path(GSL_INCLUDE_PATH NAMES gsl/gsl_blas.h) IF (NOT DEFINED GSL_LIBRARY OR NOT GSL_LIBRARY)
find_library(GSL_LIBRARY gsl) find_library(GSL_LIBRARY gsl)
find_library(GSLCBLAS_LIBRARY gslcblas) ENDIF()
IF (NOT DEFINED GSL_INCLUDE_PATH OR NOT GSL_INCLUDE_PATH)
find_path(GSL_INCLUDE_PATH NAMES gsl/gsl_blas.h)
ENDIF()
IF (NOT DEFINED GSL_CBLAS_LIBRARY OR NOT GSL_CBLAS_LIBRARY)
find_library(GSLCBLAS_LIBRARY gslcblas)
ENDIF()
set(GSL_LIBRARIES ${GSL_LIBRARY} ${GSLCBLAS_LIBRARY}) set(GSL_LIBRARIES ${GSL_LIBRARY} ${GSLCBLAS_LIBRARY})
ENDIF(INTERNAL_GSL) ENDIF(INTERNAL_GSL)
mark_as_advanced(GSL_LIBRARY GSLCBLAS_LIBRARY GSL_INCLUDE_PATH) mark_as_advanced(GSL_LIBRARY GSLCBLAS_LIBRARY GSL_INCLUDE_PATH)