ECBUILD-190: suppress deprecation messages

This commit is contained in:
Shahram Najm 2015-12-17 11:11:42 +00:00
parent 59e226bfe7
commit ce2d1ed49f
1 changed files with 9 additions and 1 deletions

View File

@ -106,8 +106,16 @@ set( HAVE_LIBOPENJPEG 0 )
if( ENABLE_JPG )
#ecbuild_add_extra_search_paths( jasper ) # help standard cmake macro with ecmwf paths
# Note: This is a deprecated feature but we need it to find Jasper at ECMWF.
# ecbuild_add_extra_search_paths modifies CMAKE_PREFIX_PATH
# which can affect future package discovery if not undone by the caller.
# The current CMAKE_PREFIX_PATH is backed up as _CMAKE_PREFIX_PATH
#
set(ECBUILD_NO_DEPRECATIONS ON) # Suppress deprecation message
ecbuild_add_extra_search_paths( jasper )
find_package( Jasper )
set(CMAKE_PREFIX_PATH ${_CMAKE_PREFIX_PATH}) # Restore CMAKE_PREFIX_PATH
set(ECBUILD_NO_DEPRECATIONS OFF) # Remove suppression
find_package( OpenJPEG )