Add missing deps

This commit is contained in:
Guilhem Lavaux 2019-01-31 16:02:18 +01:00
parent 857aa51bbd
commit 69de687876
3 changed files with 11 additions and 0 deletions

View File

@ -12,6 +12,7 @@ SET(BOOST_URL "http://sourceforge.net/projects/boost/files/boost/1.61.0/boost_1_
SET(GSL_URL "ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz" CACHE STRING "URL to download GSL from ")
mark_as_advanced(FFTW_URL EIGEN_URL HDF5_URL NETCDF_URL BOOST_URL GSL_URL)
SET(all_deps)
MACRO(CHECK_CHANGE_STATE VAR)
IF (DEFINED _PREVIOUS_${VAR})
@ -108,6 +109,7 @@ if (INTERNAL_HDF5)
MESSAGE(STATUS "Internal HDF5 directory: $ENV{HDF5_ROOT}")
MESSAGE(STATUS "Libs: ${HDF5_LIBRARIES}")
SET(HDF5_FOUND TRUE)
SET(all_deps ${all_deps} hdf5)
else (INTERNAL_HDF5)
mark_as_advanced(CLEAR HDF5_LIBRARIES HDF5_CXX_LIBRARIES HDF5_INCLUDE_DIRS)
if(HDF5_ROOTDIR)
@ -209,6 +211,8 @@ if (INTERNAL_NETCDF)
SET(NETCDF_INCLUDE_PATH ${NETCDF_BIN_DIR}/include CACHE STRING "NetCDF include" FORCE)
SET(NETCDFCPP_INCLUDE_PATH ${NETCDF_INCLUDE_PATH} CACHE STRING "NetCDF C++ include path" FORCE)
SET(all_deps ${all_deps} netcdf netcdf-c++)
ELSE(INTERNAL_NETCDF)
find_path(NETCDF_INCLUDE_PATH NAMES netcdf.h)
find_path(NETCDFCPP_INCLUDE_PATH NAMES netcdfcpp.h netcdf)

View File

@ -105,6 +105,12 @@ if (Boost_FOUND)
add_executable(graficToDensity graficToDensity.cpp)
target_link_libraries(graficToDensity ${tolink})
if (all_deps)
message(STATUS "Deps = ${all_deps}")
add_dependencies(gadgetToArray ${all_deps})
add_dependencies(testHDF5 ${all_deps})
add_dependencies(graficToDensity ${all_deps})
endif()
endif()
endif (Boost_FOUND)

View File

@ -38,6 +38,7 @@ if (HDF5_FOUND)
h5_readFlash.cpp
loadFlash.cpp
)
set_property(TARGET CosmoHDF5 PROPERTY POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS})
target_include_directories(CosmoHDF5 BEFORE PRIVATE ${HDF5_INCLUDE_DIR})
else(HDF5_FOUND)
add_library(CosmoHdf5 OBJECT