Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECC-852: Add eccodes_find_linux_utils.cmake #4

Merged
merged 1 commit into from
Jan 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions cmake/eccodes_find_linux_utils.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# (C) Copyright 2011- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http:https://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation nor
# does it submit to any jurisdiction.

function( eccodes_find_linux_util )
find_program( FOUND_PROGRAM ${_FIRST_ARG} )
if( NOT FOUND_PROGRAM )
ecbuild_critical( "Failed to find linux util: ${_FIRST_ARG}" )
endif()
endfunction( eccodes_find_linux_util )

# These utils are required for the tests to run.
# To install them on Windows, install the appropriate m2-* conda package.
# e.g. for bash: `conda install -msys2 m2-bash`
# Make sure to activate the conda environment so the utils are in the system path.
set( REQUIRED_UTILS bash find grep sed gawk diff )

foreach( UTIL ${REQUIRED_UTILS} )
eccodes_find_linux_utils( ${UTIL} )
endforeach()