Commit ae2ea8bb authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

ENH: more input files for compilation & test

parent 8cf70b8b
cmake_minimum_required(VERSION 2.8.9)
project(ExternalTemplate)
set(ExternalTemplate_LIBRARIES ExternalTemplate)
if(NOT OTB_SOURCE_DIR)
find_package(OTB REQUIRED)
list(APPEND CMAKE_MODULE_PATH ${OTB_CMAKE_DIR})
......
#include "otbWrapperApplication.h"
#include "otbWrapperApplicationFactory.h"
#include "otbSomeHeader.h"
class EmptyApp : public otb::Wrapper::Application
{
public:
......@@ -23,6 +25,12 @@ private:
void DoExecute()
{
int ThisDoesNothing = 0;
otb::SomeTemplatedClass<double> a;
a.SetValue(2.0);
double v = a.GetValue();
otbAppLogINFO("This application does nothing : "<< v);
//Silent ununed variable warning
(void) ThisDoesNothing;
......
#ifndef otbSomeFile_h
#define otbSomeFile_h
namespace otb {
void ThisFunctionDoesNothing();
}
#endif
#ifndef otbSomeHeader_h
#define otbSomeHeader_h
namespace otb
{
template <class T>
class SomeTemplatedClass
{
public:
void SetValue(const T &val);
T GetValue(void);
private:
T m_Value;
};
}
#include "otbSomeHeader.hxx"
#endif
#ifndef otbSomeHeader_hxx
#define otbSomeHeader_hxx
namespace otb
{
template <class T>
void
SomeTemplatedClass<T>::SetValue(const T &val)
{
m_Value = val;
}
template <class T>
T
SomeTemplatedClass<T>::GetValue(void)
{
return m_Value;
}
}
#include "otbSomeHeader.hxx"
#endif
#include "otbLogger.h"
namespace otb {
int ThisDoesNothing = 0;
void ThisFunctionDoesNothing()
{
Logger::Instance()->Info("This function does nothing\n");
}
}
#include <cstdlib>
#include "otbSomeFile.h"
int otbEmptyTest( int , char ** )
{
otb::ThisFunctionDoesNothing();
return EXIT_SUCCESS;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment