Skip to content
Snippets Groups Projects
Commit e34363ab authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files
parents ac8ada6f fbe641d5
No related branches found
No related tags found
No related merge requests found
......@@ -55,8 +55,15 @@ ENDIF(OTB_FOUND)
SET(BUILD_SHARED_LIBS ${OTB_BUILD_SHARED_LIBS})
ADD_SUBDIRECTORY(Code)
INCLUDE_DIRECTORIES(${OTB_Wrapper_Source_Dir}/Code)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/Code
${CMAKE_CURRENT_SOURCE_DIR}/Code/Core
${CMAKE_CURRENT_SOURCE_DIR}/Code/Wrappers
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/Code
${CMAKE_CURRENT_BINARY_DIR}/Code/Wrappers
)
# Enable / Disable testing
OPTION(BUILD_TESTING "Build testing." OFF)
......
SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
IF(WIN32)
ADD_DEFINITIONS(-DWIN32)
ENDIF(WIN32)
SET(OTB_WRAPPER_TESTS ${CXX_TEST_PATH}/otbWrapperTests)
ADD_TEST(owTuParameterNew ${OTB_WRAPPER_TESTS}
otbWrapperParameterNew
)
ADD_TEST(owTvParameter ${OTB_WRAPPER_TESTS}
otbWrapperParameterTest1
"param1"
)
# ------- Source files CXX -----------------------------------
SET(Wrapper_SRCS
otbWrapperTests.cxx
otbWrapperParameterTest.cxx
)
ADD_EXECUTABLE(otbWrapperTests ${Wrapper_SRCS})
TARGET_LINK_LIBRARIES(otbWrapperTests OTBIO OTBCommon ITKIO ITKCommon OTBTesting)
/*=========================================================================
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.
=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include "otbWrapperParameter.h"
int otbWrapperParameterNew(int argc, char* argv[])
{
typedef otb::Wrapper::Parameter ParameterBaseType;
ParameterBaseType::Pointer parameter = ParameterBaseType::New();
std::cout << parameter << std::endl;
return EXIT_SUCCESS;
}
int otbWrapperParameterTest1(int argc, char* argv[])
{
typedef otb::Wrapper::Parameter ParameterBaseType;
ParameterBaseType::Pointer parameter = ParameterBaseType::New();
const string name = argv[1];
parameter->SetName(name);
if (name == parameter->GetName())
{
return EXIT_SUCCESS;
}
else
{
return EXIT_FAILURE;
}
}
/*=========================================================================
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 otbProjectionsTest 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 "otbTestMain.h"
void RegisterTests()
{
REGISTER_TEST(otbWrapperParameterNew);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment