Commit 9c5a6e7e authored by Victor Poughon's avatar Victor Poughon

REFAC: remove OTB_USE_DEPRECATED

parent 664de77c
......@@ -196,8 +196,6 @@ foreach(otb-module ${OTB_MODULES_ALL})
if(OTB_MODULE_${otb-module}_ACTIVATION_OPTION
AND NOT ${OTB_MODULE_${otb-module}_ACTIVATION_OPTION})
otb_module_disable("${otb-module}" "${OTB_MODULE_${otb-module}_ACTIVATION_OPTION}")
elseif(OTB_MODULE_${otb-module}_IS_DEPRECATED AND NOT OTB_USE_DEPRECATED)
otb_module_disable("${otb-module}" "OTB_USE_DEPRECATED")
endif()
endforeach()
......
......@@ -219,11 +219,6 @@ else()
set(OTB_CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS OFF)
endif()
#-----------------------------------------------------------------------------
# Option to activate deprecated classes
option(OTB_USE_DEPRECATED "Turn on the use and test of deprecated classes" OFF)
mark_as_advanced(OTB_USE_DEPRECATED)
# Although the OpenMP option looks like a 3rd party module, it is NOT. This option
# is handled with other compilation flags in file OTBSetStandardCompilerFlags.cmake
# before any module is parsed or enabled (see OTBModuleEnablement.cmake later on
......
......@@ -73,10 +73,8 @@ target_link_libraries(StreamingImageReadWrite ${OTB_LIBRARIES})
add_executable(VectorDataIOExample VectorDataIOExample.cxx)
target_link_libraries(VectorDataIOExample ${OTB_LIBRARIES})
if(OTB_USE_DEPRECATED)
add_executable(TileMapImageIOExample TileMapImageIOExample.cxx)
target_link_libraries(TileMapImageIOExample ${OTB_LIBRARIES})
endif()
add_executable(TileMapImageIOExample TileMapImageIOExample.cxx)
target_link_libraries(TileMapImageIOExample ${OTB_LIBRARIES})
if(BUILD_TESTING)
add_subdirectory(test)
......
......@@ -101,17 +101,15 @@ otb_add_test(NAME ioTeImageToKmzAndMapFileProductExample COMMAND ${OTB_TEST_DRIV
set_property(TEST ioTeImageToKmzAndMapFileProductExample PROPERTY RESOURCE_LOCK web_access)
endif()
if(OTB_USE_DEPRECATED)
otb_add_test(NAME ioTeTileMapImageIOExampleTest COMMAND ${OTB_TEST_DRIVER}
--compare-image 10.0
${BASELINE}/openStreetMap.png
${TEMP}/openStreetMap.png
Execute $<TARGET_FILE:TileMapImageIOExample>
${INPUTDATA}/osmfile.otb
${TEMP}/openStreetMap.png
${TEMP}
1.4835345
43.55968261
12
)
endif()
otb_add_test(NAME ioTeTileMapImageIOExampleTest COMMAND ${OTB_TEST_DRIVER}
--compare-image 10.0
${BASELINE}/openStreetMap.png
${TEMP}/openStreetMap.png
Execute $<TARGET_FILE:TileMapImageIOExample>
${INPUTDATA}/osmfile.otb
${TEMP}/openStreetMap.png
${TEMP}
1.4835345
43.55968261
12
)
......@@ -33,9 +33,7 @@
#include "otbBSQImageIOFactory.h"
#include "otbRADImageIOFactory.h"
#if OTB_USE_DEPRECATED
#include "otbTileMapImageIOFactory.h"
#endif
namespace otb
{
......@@ -100,9 +98,7 @@ ImageIOFactory::RegisterBuiltInFactories()
itk::ObjectFactoryBase::RegisterFactory(GDALImageIOFactory::New());
itk::ObjectFactoryBase::RegisterFactory(ONERAImageIOFactory::New());
itk::ObjectFactoryBase::RegisterFactory(MSTARImageIOFactory::New());
#if OTB_USE_DEPRECATED
itk::ObjectFactoryBase::RegisterFactory(TileMapImageIOFactory::New());
#endif
firstTime = false;
}
}
......
......@@ -77,9 +77,7 @@ otbMultiImageFileWriterTest.cxx
otbWriteGeomFile.cxx
)
if(OTB_USE_DEPRECATED)
set(OTBImageIOTests ${OTBImageIOTests} otbImageFileReaderServerName.cxx)
endif()
set(OTBImageIOTests ${OTBImageIOTests} otbImageFileReaderServerName.cxx)
add_executable(otbImageIOTestDriver ${OTBImageIOTests})
target_link_libraries(otbImageIOTestDriver ${OTBImageIO-Test_LIBRARIES})
......@@ -522,12 +520,10 @@ otb_add_test(NAME ioTvONERAImageFileWriterComplex COMMAND otbImageIOTestDriver
LARGEINPUT{ONERA/spa3_0215_rad.ent}
${TEMP}/ioImageFileReaderONERAComplexWrite.ent )
if(OTB_USE_DEPRECATED)
otb_add_test(NAME ioTvImageFileReaderServerNameOTBTest COMMAND otbImageIOTestDriver
otbImageFileReaderServerName
${OTB_DATA_ROOT}/Examples/osmfile.otb)
set_property(TEST ioTvImageFileReaderServerNameOTBTest PROPERTY RESOURCE_LOCK web_access)
endif()
otb_add_test(NAME ioTvImageFileReaderServerNameOTBTest COMMAND otbImageIOTestDriver
otbImageFileReaderServerName
${OTB_DATA_ROOT}/Examples/osmfile.otb)
set_property(TEST ioTvImageFileReaderServerNameOTBTest PROPERTY RESOURCE_LOCK web_access)
#dashboard_hell
# otb_add_test(NAME ioTvImageFileReaderServerNameHTTPTest COMMAND otbImageIOTestDriver
......
......@@ -152,7 +152,5 @@ void RegisterTests()
REGISTER_TEST(otbImageFileWriterOptBandTest);
REGISTER_TEST(otbMultiImageFileWriterTest);
REGISTER_TEST(otbWriteGeomFile);
#if OTB_USE_DEPRECATED
REGISTER_TEST(otbImageFileReaderServerName);
#endif
}
......@@ -222,6 +222,7 @@ ExternalProject_Add(OTB
CMAKE_ARGS ${OTB_SB_CONFIG}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
LOG_CONFIGURE 1
CMAKE_GENERATOR Ninja
)
......
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