diff --git a/Modules/Applications/AppClassification/app/otbTrainOGRLayersClassifier.cxx b/Modules/Applications/AppClassification/app/otbTrainOGRLayersClassifier.cxx index 2e4faf95514fe6e7aa2219ed86780604a3b644c6..e0a044ae5e80149d3dc6bbd4aa6027a8aafbb8cd 100644 --- a/Modules/Applications/AppClassification/app/otbTrainOGRLayersClassifier.cxx +++ b/Modules/Applications/AppClassification/app/otbTrainOGRLayersClassifier.cxx @@ -202,7 +202,7 @@ private: otbAppLogINFO( "Elapsed: "<< ((double)(toc - tic) / CLOCKS_PER_SEC)<<" seconds."); - #elseif + #else otbAppLogFATAL("Module LIBSVM is not installed. You should consider turning OTB_USE_LIBSVM on during cmake configuration."); #endif diff --git a/Modules/Learning/Supervised/test/otbTrainMachineLearningModel.cxx b/Modules/Learning/Supervised/test/otbTrainMachineLearningModel.cxx index f824e0098161163fec3bfa449c2d396132a4a8d4..24d984b0965c949cf91df179b25d72b51e2c2775 100644 --- a/Modules/Learning/Supervised/test/otbTrainMachineLearningModel.cxx +++ b/Modules/Learning/Supervised/test/otbTrainMachineLearningModel.cxx @@ -20,13 +20,7 @@ #include <string> #include <algorithm> -#include <otbMachineLearningModel.h> - -#ifdef OTB_USE_LIBSVM #include "otbLibSVMMachineLearningModel.h" -#endif - -#ifdef OTB_USE_OPENCV #include "otbSVMMachineLearningModel.h" #include "otbKNearestNeighborsMachineLearningModel.h" #include "otbRandomForestsMachineLearningModel.h" @@ -36,7 +30,6 @@ #include "otbDecisionTreeMachineLearningModel.h" #include "otbGradientBoostedTreeMachineLearningModel.h" #include "otbKNearestNeighborsMachineLearningModel.h" -#endif #include "otbConfusionMatrixCalculator.h" @@ -195,7 +188,6 @@ bool ReadDataRegressionFile(const std::string & infname, InputListSampleRegressi return true; } -#ifdef OTB_USE_LIBSVM int otbLibSVMMachineLearningModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) []) { typedef otb::LibSVMMachineLearningModel<InputValueType, TargetValueType> SVMType; @@ -284,9 +276,7 @@ int otbSVMMachineLearningModelNew(int itkNotUsed(argc), char * itkNotUsed(argv) SVMType::Pointer svmclassifier = SVMType::New(); return EXIT_SUCCESS; } -#endif -#ifdef OTB_USE_OPENCV int otbSVMMachineLearningModel(int argc, char * argv[]) { if (argc != 3 ) @@ -1046,4 +1036,3 @@ int otbGradientBoostedTreeMachineLearningModel(int argc, char * argv[]) return EXIT_FAILURE; } } -#endif