diff --git a/CMake/OTBModuleEnablement.cmake b/CMake/OTBModuleEnablement.cmake index 453b8213d096224d76511b0b8ff50800f551d1a8..4ec34d94df5315c4381769b3c33a380358163a86 100644 --- a/CMake/OTBModuleEnablement.cmake +++ b/CMake/OTBModuleEnablement.cmake @@ -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() diff --git a/CMakeLists.txt b/CMakeLists.txt index e8d6abc448d1d447da9f08da2852fd9e87d789fb..7cb4d0d072f9444dad437585e8a16ff80143ef6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/Examples/IO/CMakeLists.txt b/Examples/IO/CMakeLists.txt index f3aab131cba0881420796838e65b0065fac1bca2..90ad881b7476dc099555973d6ff367dbd7cf0f27 100644 --- a/Examples/IO/CMakeLists.txt +++ b/Examples/IO/CMakeLists.txt @@ -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) diff --git a/Examples/IO/test/CMakeLists.txt b/Examples/IO/test/CMakeLists.txt index 9a410111a55a12135b96cec77f7fb12701736dfd..458530955d6749539d11ef85e3fde273ee27b174 100644 --- a/Examples/IO/test/CMakeLists.txt +++ b/Examples/IO/test/CMakeLists.txt @@ -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 + ) diff --git a/Modules/IO/ImageIO/src/otbImageIOFactory.cxx b/Modules/IO/ImageIO/src/otbImageIOFactory.cxx index 664fd51b85b2126f749296874d8c29998296c34e..be454bf577e62598cd9266cd1661a473994f6f78 100644 --- a/Modules/IO/ImageIO/src/otbImageIOFactory.cxx +++ b/Modules/IO/ImageIO/src/otbImageIOFactory.cxx @@ -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; } } diff --git a/Modules/IO/ImageIO/test/CMakeLists.txt b/Modules/IO/ImageIO/test/CMakeLists.txt index d9c01a09d810355b0aff9405302cc69032845b27..6a1a09f58b30d5c16d08619bd5ed9771915393e5 100644 --- a/Modules/IO/ImageIO/test/CMakeLists.txt +++ b/Modules/IO/ImageIO/test/CMakeLists.txt @@ -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 diff --git a/Modules/IO/ImageIO/test/otbImageIOTestDriver.cxx b/Modules/IO/ImageIO/test/otbImageIOTestDriver.cxx index d92b29cfd41761023e98370683bf15e51ce719a5..4915a8e535807cb050bf0ea428ee2e0bcc7a8f39 100644 --- a/Modules/IO/ImageIO/test/otbImageIOTestDriver.cxx +++ b/Modules/IO/ImageIO/test/otbImageIOTestDriver.cxx @@ -152,7 +152,5 @@ void RegisterTests() REGISTER_TEST(otbImageFileWriterOptBandTest); REGISTER_TEST(otbMultiImageFileWriterTest); REGISTER_TEST(otbWriteGeomFile); -#if OTB_USE_DEPRECATED REGISTER_TEST(otbImageFileReaderServerName); -#endif } diff --git a/SuperBuild/CMake/External_otb.cmake b/SuperBuild/CMake/External_otb.cmake index 987f301a165564e91a32b052263f54e227ac395a..d70aa19f25c354d3bf63bec2516c14976a9a6040 100644 --- a/SuperBuild/CMake/External_otb.cmake +++ b/SuperBuild/CMake/External_otb.cmake @@ -222,6 +222,7 @@ ExternalProject_Add(OTB CMAKE_ARGS ${OTB_SB_CONFIG} CMAKE_COMMAND ${SB_CMAKE_COMMAND} LOG_CONFIGURE 1 + CMAKE_GENERATOR Ninja )