Fix netcdf path propagation

This commit is contained in:
Guilhem Lavaux 2018-03-26 10:18:54 +02:00
parent 7353701ad2
commit 45912a8970

View File

@ -160,12 +160,15 @@ if (INTERNAL_NETCDF)
--disable-cdmremote --disable-rpc --enable-cxx-4 --disable-cdmremote --disable-rpc --enable-cxx-4
--disable-examples ${EXTRA_NC_FLAGS} CC=${CMAKE_C_COMPILER} --disable-examples ${EXTRA_NC_FLAGS} CC=${CMAKE_C_COMPILER}
CXX=${CMAKE_CXX_COMPILER}) CXX=${CMAKE_CXX_COMPILER})
list(INSERT CMAKE_PREFIX_PATH 0 ${EXT_INSTALL})
string(REPLACE ";" "|" CMAKE_PREFIX_PATH_ALT_SEP "${CMAKE_PREFIX_PATH}")
ExternalProject_Add(netcdf ExternalProject_Add(netcdf
DEPENDS ${hdf5_built} DEPENDS ${hdf5_built}
PREFIX ${BUILD_PREFIX}/netcdf-prefix PREFIX ${BUILD_PREFIX}/netcdf-prefix
URL ${NETCDF_URL} URL ${NETCDF_URL}
LIST_SEPARATOR |
CMAKE_ARGS CMAKE_ARGS
-DCMAKE_PREFIX_PATH=${EXT_INSTALL} -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH_ALT_SEP}
-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