Skip to content
Snippets Groups Projects
Commit eab17f35 authored by Christophe Palmann's avatar Christophe Palmann
Browse files

ENH: fixed otbTrainOGRLayersClassifier and OGRLayerClassifier apps comp. when...

ENH: fixed otbTrainOGRLayersClassifier and OGRLayerClassifier apps comp. when libsvm and opencv modules are not installed
parent 815e01c4
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,10 @@
#include "itkListSample.h"
#include "otbShiftScaleSampleListFilter.h"
#ifdef OTB_USE_LIBSVM
#include "otbLibSVMMachineLearningModel.h"
#endif
#include <time.h>
......@@ -119,6 +122,8 @@ private:
void DoExecute()
{
#ifdef OTB_USE_LIBSVM
clock_t tic = clock();
std::string shapefile = GetParameterString("inshp").c_str();
......@@ -214,6 +219,11 @@ private:
clock_t toc = clock();
otbAppLogINFO( "Elapsed: "<< ((double)(toc - tic) / CLOCKS_PER_SEC)<<" seconds.");
#elseif
otbAppLogFATAL("Module LIBSVM is not installed. You should consider turning OTB_USE_LIBSVM on during cmake configuration.");
#endif
}
};
......
......@@ -26,7 +26,10 @@
#include "itkListSample.h"
#include "otbShiftScaleSampleListFilter.h"
#ifdef OTB_USE_LIBSVM
#include "otbLibSVMMachineLearningModel.h"
#endif
#include <time.h>
......@@ -118,6 +121,7 @@ private:
void DoExecute()
{
#ifdef OTB_USE_LIBSVM
clock_t tic = clock();
std::string shapefile = GetParameterString("inshp");
......@@ -197,6 +201,11 @@ private:
clock_t toc = clock();
otbAppLogINFO( "Elapsed: "<< ((double)(toc - tic) / CLOCKS_PER_SEC)<<" seconds.");
#elseif
otbAppLogFATAL("Module LIBSVM is not installed. You should consider turning OTB_USE_LIBSVM on during cmake configuration.");
#endif
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment