From 79608724eaf92197523d3ee4367946995fe05eef Mon Sep 17 00:00:00 2001 From: Christophe Palmann <christophe.palmann@c-s.fr> Date: Thu, 19 Mar 2015 17:27:55 +0100 Subject: [PATCH] COMP: fixed small pb --- .../app/otbTrainOGRLayersClassifier.cxx | 2 +- .../Supervised/test/otbTrainMachineLearningModel.cxx | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Modules/Applications/AppClassification/app/otbTrainOGRLayersClassifier.cxx b/Modules/Applications/AppClassification/app/otbTrainOGRLayersClassifier.cxx index 2e4faf9551..e0a044ae5e 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 f824e00981..24d984b096 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 -- GitLab