Skip to content

Commit

Permalink
Merge pull request #102 from jschueller/prefix_path
Browse files Browse the repository at this point in the history
Use CMAKE_PREFIX_PATH
  • Loading branch information
xylar authored Apr 23, 2020
2 parents bc91691 + 6b31b56 commit 8192b3b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 29 deletions.
15 changes: 7 additions & 8 deletions .azure-pipelines/azure-pipelines-osx.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .scripts/run_docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ mkdir -p "$ARTIFACTS"
DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}"
rm -f "$DONE_CANARY"

# Allow people to specify extra default arguments to `docker run` (e.g. `--rm`)
DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}"
if [ -z "${CI}" ]; then
DOCKER_RUN_ARGS="-it "
DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}"
fi

export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}"
Expand Down
6 changes: 1 addition & 5 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ cmake -G "NMake Makefiles" ^
-DENABLE_TESTS=ON ^
-DENABLE_HDF4=ON ^
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
-DZLIB_LIBRARY="%LIBRARY_LIB%\zlib.lib" ^
-DZLIB_INCLUDE_DIR="%LIBRARY_INC%" ^
-DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
-D ENABLE_CDF5=ON ^
%SRC_DIR%
if errorlevel 1 exit \b 1

cmake --build . --config %BUILD_TYPE%
cmake --build . --config %BUILD_TYPE% --target install
if errorlevel 1 exit \b 1

:: We need to add some entries to PATH before running the tests
Expand All @@ -36,5 +34,3 @@ goto end_tests
ctest -VV
:end_tests

cmake --build . --config %BUILD_TYPE% --target install
if errorlevel 1 exit \b 1
14 changes: 5 additions & 9 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fi
# Build static.
cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_PREFIX_PATH=${PREFIX} \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DENABLE_DAP=ON \
-DENABLE_HDF4=ON \
Expand All @@ -60,20 +61,18 @@ cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DENABLE_DOXYGEN=OFF \
-DCMAKE_C_FLAGS_RELEASE=${CFLAGS} \
-DCMAKE_C_FLAGS_DEBUG=${CFLAGS} \
-DCURL_INCLUDE_DIR=${PREFIX}/include \
-DCURL_LIBRARY=${PREFIX}/lib/libcurl${SHLIB_EXT} \
-DENABLE_CDF5=ON \
${CMAKE_PLATFORM_FLAGS[@]} \
${PARALLEL} \
${SRC_DIR}
make -j${CPU_COUNT} ${VERBOSE_CM}
# ctest # Run only for the shared lib build to save time.
make install -j${CPU_COUNT}
make install -j${CPU_COUNT} ${VERBOSE_CM}
make clean

# Build shared.
cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_PREFIX_PATH=${PREFIX} \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DENABLE_DAP=ON \
-DENABLE_HDF4=ON \
Expand All @@ -84,15 +83,12 @@ cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DENABLE_DOXYGEN=OFF \
-DCMAKE_C_FLAGS_RELEASE=${CFLAGS} \
-DCMAKE_C_FLAGS_DEBUG=${CFLAGS} \
-DCURL_INCLUDE_DIR=${PREFIX}/include \
-DCURL_LIBRARY=${PREFIX}/lib/libcurl${SHLIB_EXT} \
-DENABLE_CDF5=ON \
${CMAKE_PLATFORM_FLAGS[@]} \
${PARALLEL} \
${SRC_DIR}
make -j${CPU_COUNT} ${VERBOSE_CM}
make install -j${CPU_COUNT}
ctest -VV --output-on-failure
make install -j${CPU_COUNT} ${VERBOSE_CM}
ctest -VV --output-on-failure -j${CPU_COUNT}

if [[ ${c_compiler} != "toolchain_c" ]]; then
# Fix build paths in cmake artifacts
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set version = "4.7.4" %}
{% set build = 2 %}
{% set build = 3 %}

# recipe-lint fails if mpi is undefined
{% set mpi = mpi or 'nompi' %}
Expand Down

0 comments on commit 8192b3b

Please sign in to comment.