undue include of svm.h
Description
The include of svm.h header file in otbLibSVMMachineLearningModel.h must be conditioned to the use of libsvm.
Steps to reproduce
I configured the OTB compilation through the following CMake command line:
cmake -DBUILD_TESTING:BOOL=ON -DOTB_USE_QT:BOOL=ON -DOTB_USE_QWT:BOOL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ../otb
There is no reference to SVM in this command line and the default value of OTB_USE_LIBSVM is OFF. So, in such conditions, OTB should not depends on libsvm.
However, the compilation fails with the error below:
In file included from /home/user/workspace/otb/Modules/Learning/Supervised/test/otbLabelMapClassifier.cxx:34:0:
/home/user/workspace/otb/Modules/Learning/Supervised/include/otbLibSVMMachineLearningModel.h:28:17: fatal error: svm.h: No such file or directory
compilation terminated.
Modules/Learning/Supervised/test/CMakeFiles/otbSupervisedTestDriver.dir/build.make:254: recipe for target 'Modules/Learning/Supervised/test/CMakeFiles/otbSupervisedTestDriver.dir/otbLabelMapClassifier.cxx.o' failed
make[2]: *** [Modules/Learning/Supervised/test/CMakeFiles/otbSupervisedTestDriver.dir/otbLabelMapClassifier.cxx.o] Error 1
CMakeFiles/Makefile2:27667: recipe for target 'Modules/Learning/Supervised/test/CMakeFiles/otbSupervisedTestDriver.dir/all' failed
make[1]: *** [Modules/Learning/Supervised/test/CMakeFiles/otbSupervisedTestDriver.dir/all] Error 2
The compilation is successful if "-DOTB_USE_LIBSVM:BOOL=ON" option is added.