Wrong path for GDAL_CONFIG or GDALCONFIG_EXECUTABLE cmake variable produce incoherent results in the OTB configuration
Mantis Issue 245, reported by mgrizonnet, assigned to jmalik, created: 2011-03-03
To reproduce the bug:
-set the variable GDAL_CONFIG or GDALCONFIG_EXECUTABLE to a wrong path -> The OTB cmake configuration runs without problem but it will produce false configuration (for example in this case the support of HDF is deactivated even OTB is build with a gdal where hdf is activated...)
We should check if "gdal_config" executable exists and stop the configuration if it is not the case...
1299471223 - christopConfirm that there is an issue with that: for clang configuration, it ends up in an infinite loop at this point. I had to comment out the HDF test in cmake to go through. Probably related, but not 100% sure.
1303392844 - mickaelI think we can replace L39 of ImportGdal.cmake by MESSAGE(FATAL_ERROR "Cannot find gdal-config. Please verify the path of the gdal library.") to avoid this case.
Please confirm that I have understand the problem and I will commit/push the correction.
1303816182 - julienmone problem though : gdal-config does not exists on Windows.
we should move the IF(NOT WIN32) above the gdal-config management code. then, OK to put a FATAl_ERROR when gdal-config is not found.
1303830645 - julienmFixed in : http://hg.orfeo-toolbox.org/OTB/rev/9b42b4b0cc8d
On unix like systems, we enforce the GDALCONFIG_EXECUTABLE variable to be a valid file