Commit 39c99797 authored by Rashad Kanavath's avatar Rashad Kanavath

COMP: more checks before warning

parent fbffb556
...@@ -32,13 +32,20 @@ endif() ...@@ -32,13 +32,20 @@ endif()
if(EXISTS "${OSSIM_INCLUDE_DIR}/ossim/imaging/ossimImageRenderer.h") if(EXISTS "${OSSIM_INCLUDE_DIR}/ossim/imaging/ossimImageRenderer.h")
file(STRINGS "${OSSIM_INCLUDE_DIR}/ossim/imaging/ossimImageRenderer.h" _ossim_image_renderer_h_CONTENTS REGEX "^// \\$Id: ossimImageRenderer\\.h [0-9.]+ ") file(STRINGS "${OSSIM_INCLUDE_DIR}/ossim/imaging/ossimImageRenderer.h" _ossim_image_renderer_h_CONTENTS REGEX "^// \\$Id: ossimImageRenderer\\.h [0-9.]+ ")
string(REGEX REPLACE ".*ossimImageRenderer\\.h ([0-9.]+) .*" "\\1" _ossim_svn_revision_hint "${_ossim_image_renderer_h_CONTENTS}") string(REGEX REPLACE ".*ossimImageRenderer\\.h ([0-9.]+) .*" "\\1" _ossim_svn_revision_hint "${_ossim_image_renderer_h_CONTENTS}")
if(NOT "${_ossim_svn_revision_hint}" STREQUAL "23537")
message(WARNING "The OSSIM version found doesn't correspond to SVN revision 23537 (the recommended revision for OTB)." if("${_ossim_svn_revision_hint}" LESS "23537")
"There are known issues with version 1.8.16 (bugs in Sentinel1 " message(WARNING "The OSSIM include directory detected by OTB is: '${OSSIM_INCLUDE_DIR}'."
"calibration) and with official archive 1.8.20-1 (RpcModel returns " "This version does not have support for SENTINEL-1 products."
"nans outside the image extent)") "Opening an image will result in immediate crash!. "
"Please consider updating your ossim to latest stable release.(1.8.20-3)")
else()
if("${_ossim_svn_revision_hint}" LESS "23664")
message(WARNING "The OSSIM include directory detected by OTB is '${OSSIM_INCLUDE_DIR}'."
"This version has a critical bug inside ossimRpcModel."
"When an input point outside image extent is given the model returns 'NaN'."
"Please consider updating your ossim to latest stable release.(1.8.20-3)")
endif()
endif() endif()
#message(STATUS "OSSIM SVN rev. hint : ${_ossim_svn_revision_hint}")
else() else()
if(NOT Ossim_FIND_QUIETLY) if(NOT Ossim_FIND_QUIETLY)
message(WARNING "ossimImageRenderer.h not found !") message(WARNING "ossimImageRenderer.h not found !")
...@@ -55,5 +62,5 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS( Ossim DEFAULT_MSG OSSIM_LIBRARY OSSIM_INCLUDE ...@@ -55,5 +62,5 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS( Ossim DEFAULT_MSG OSSIM_LIBRARY OSSIM_INCLUDE
mark_as_advanced( OSSIM_INCLUDE_DIR OSSIM_LIBRARY ) mark_as_advanced( OSSIM_INCLUDE_DIR OSSIM_LIBRARY )
set(OSSIM_LIBRARIES ${OSSIM_LIBRARY}) set(OSSIM_LIBRARIES "${OSSIM_LIBRARY};${OPENTHREADS_LIBRARY}")
set(OSSIM_INCLUDE_DIRS ${OSSIM_INCLUDE_DIR}) set(OSSIM_INCLUDE_DIRS ${OSSIM_INCLUDE_DIR})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment