diff --git a/Examples/Tutorials/CMakeLists.txt b/Examples/Tutorials/CMakeLists.txt index d28fe0ff0ad5013d40fad0897bf030d6d456f6c0..2e5caa8e5e98ebedd26afe0316f0b964e48470d3 100644 --- a/Examples/Tutorials/CMakeLists.txt +++ b/Examples/Tutorials/CMakeLists.txt @@ -1,6 +1,8 @@ PROJECT(TutorialsExamples) INCLUDE_REGULAR_EXPRESSION("^.*$") +SET(TUTORIALS_EXAMPLES ${CXX_TEST_PATH}/otbTutorialsExamplesTests) + ADD_EXECUTABLE(HelloWorldOTB HelloWorldOTB.cxx ) TARGET_LINK_LIBRARIES(HelloWorldOTB OTBCommon OTBIO) @@ -20,4 +22,25 @@ ADD_EXECUTABLE(SimpleViewer SimpleViewer.cxx ) TARGET_LINK_LIBRARIES(SimpleViewer OTBCommon OTBIO OTBGui OTBVisu) ADD_EXECUTABLE(OrthoFusion OrthoFusion.cxx ) -TARGET_LINK_LIBRARIES(OrthoFusion OTBProjections OTBCommon OTBIO) \ No newline at end of file +TARGET_LINK_LIBRARIES(OrthoFusion OTBFusion OTBProjections OTBCommon OTBIO) + +IF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING ) + +SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/Tutorials) + +SET(INPUTDATA ${OTB_SOURCE_DIR}/Examples/Data) +SET(TEMP ${OTB_BINARY_DIR}/Examples/Tutorials/Testing/Temporary) + +SET(EXE_TESTS ${CXX_TEST_PATH}/otbTutorialsExamplesTests) + +SET(TOL 0.0) + + + + +INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}") + +ADD_EXECUTABLE(otbTutorialsExamplesTests otbTutorialsExamplesTests.cxx) +TARGET_LINK_LIBRARIES(otbTUtorialsExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBFusion) + +ENDIF( NOT OTB_DISABLE_CXX_TESTING AND NOT OTB_DISABLE_CXX_EXAMPLES_TESTING ) diff --git a/Examples/Tutorials/otbTutorialsExamplesTests.cxx b/Examples/Tutorials/otbTutorialsExamplesTests.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a81128ac7a2b814f59f32021fad6b3894034abb3 --- /dev/null +++ b/Examples/Tutorials/otbTutorialsExamplesTests.cxx @@ -0,0 +1,33 @@ +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +// this file defines the otbMultiScaleTest for the test driver +// and all it expects is that you have a function called RegisterTests +#if defined(_MSC_VER) +#pragma warning ( disable : 4786 ) +#endif +#include <iostream> +#include "otbTestMain.h" + +void RegisterTests() +{ + REGISTER_TEST(HelloWorldOTBTest); +} + +#undef main +#define main HelloWorldOTBTest +#include "HelloWorldOTBTest.cxx"