diff --git a/CMake/OTBModuleHeaderTest.cmake b/CMake/OTBModuleHeaderTest.cmake index 1b01c7e82ef5e8288ec5181a5f4f4667de5250f4..bcfc52dc220eb11628323bdeec7c22a764709591 100644 --- a/CMake/OTBModuleHeaderTest.cmake +++ b/CMake/OTBModuleHeaderTest.cmake @@ -131,13 +131,11 @@ macro( otb_module_headertest _name ) ) add_executable( ${_test_name} ${_header_test_src} ) target_link_libraries( ${_test_name} OTBCommon ) + if (${_name}_LIBRARIES) - # OTBBoostAdapters depends only on OTBBoost, - # and OTBBoost_LIBRARIES can be empty, so check for it - add_dependencies(${_test_name} ${${_name}_LIBRARIES}) - # this target_link should be needed only on WIN32 target_link_libraries(${_test_name} ${${_name}_LIBRARIES}) endif() + add_dependencies(${_name}-all ${_test_name}) math( EXPR _test_num "${_test_num} + 1" ) endforeach() diff --git a/CMakeLists.txt b/CMakeLists.txt index b54eb9fda5d739b3344c2fd2837bd43681b3e38b..e8d6abc448d1d447da9f08da2852fd9e87d789fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,8 @@ cmake_minimum_required(VERSION 3.1.0) foreach(p CMP0025 # CMake 3.0 CMP0042 # CMake 3.0 + CMP0046 # CMake 3.0 + CMP0054 # CMake 3.1 CMP0058 # CMake 3.3 CMP0072 # CMake 3.11 ) @@ -31,17 +33,6 @@ foreach(p endif() endforeach() -# CMP0046 : from CMake 3.0, old behaviour is more convenient -if(POLICY CMP0046) - cmake_policy(SET CMP0046 OLD) -endif() - -# TODO Check if OTB cmake is compatible with CMP0054 NEW policy -# CMP0054 : New policy introduce in CMake 3.1, keep old behaviour for now -if(POLICY CMP0054) - cmake_policy(SET CMP0054 OLD) -endif() - project(OTB) set(CMAKE_CXX_STANDARD 14) diff --git a/Modules/Detection/ObjectDetection/include/otbObjectDetectionClassifier.hxx b/Modules/Detection/ObjectDetection/include/otbObjectDetectionClassifier.hxx index 27f12b54d4360368e0330e58d721b2fb0523d25a..a28fa0963119947e192be228edf51de2cf2cabce 100644 --- a/Modules/Detection/ObjectDetection/include/otbObjectDetectionClassifier.hxx +++ b/Modules/Detection/ObjectDetection/include/otbObjectDetectionClassifier.hxx @@ -258,7 +258,6 @@ PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFun InputImageType* input = static_cast<InputImageType*>(this->itk::ProcessObject::GetInput(0)); const ModelType* model = this->GetModel(); - typedef typename RegionType::IndexType IndexType; IndexType begin = outputRegionForThread.GetIndex(); IndexType end = begin; end[0] += outputRegionForThread.GetSize(0); diff --git a/Modules/Filtering/ChangeDetection/include/otbKullbackLeiblerSupervizedDistanceImageFilter.hxx b/Modules/Filtering/ChangeDetection/include/otbKullbackLeiblerSupervizedDistanceImageFilter.hxx index a4c4deb51c9dcf7bab1403a1257262b80de0e4e5..962549d17a4f8d8005ead961e915f9433b895e8e 100644 --- a/Modules/Filtering/ChangeDetection/include/otbKullbackLeiblerSupervizedDistanceImageFilter.hxx +++ b/Modules/Filtering/ChangeDetection/include/otbKullbackLeiblerSupervizedDistanceImageFilter.hxx @@ -74,12 +74,6 @@ KullbackLeiblerSupervizedDistance<TInput1, TInput2, TInputROIImage, TOutput> ITK_LOCATION); } - typedef ROIdataConversion<typename TInput2::ImageType, TInputROIImage> - ROIConversionType2; - - typedef itk::ConstNeighborhoodIterator< - typename ROIConversionType2::OutputImageType> ROIInputType2; - typename ROIConversionType2::Pointer conversion2 = ROIConversionType2::New(); conversion2->SetInputImage(img2); conversion2->SetROIImage(imgROI); diff --git a/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.hxx b/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.hxx index ddc43c87b2a12278e30a683104b5d5ef8f29ae38..ada40dd10636ba4eb02de03470f0aaf2bc9a0f6e 100644 --- a/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.hxx +++ b/Modules/OBIA/RCC8/include/otbRCC8GraphFileWriter.hxx @@ -203,7 +203,6 @@ RCC8GraphFileWriter<TInputGraph> ::WriteVertex(std::ofstream& of, VertexDescriptorType index, VertexPointerType vertex) { - typedef typename AttributesMapType::iterator IteratorType; AttributesMapType attr = vertex->GetAttributesMap(); otbMsgDevMacro(<< "RCC8GraphFileWriter: WriteVertex call: " << index); of << index << " ["; diff --git a/Modules/Visualization/MonteverdiCore/src/mvdQuicklookModel.cxx b/Modules/Visualization/MonteverdiCore/src/mvdQuicklookModel.cxx index 44ce4f8fc63bd0155255d06ab26b825de909b9d3..3e3560b400150e74ae9de3239a3d5aec62fc285a 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdQuicklookModel.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdQuicklookModel.cxx @@ -94,7 +94,7 @@ QuicklookModel if( buildContext->m_Settings!=NULL ) { VectorImageSettings * const settings = - static_cast< VectorImageSettings * const >( buildContext->m_Settings ); + static_cast< VectorImageSettings * >( buildContext->m_Settings ); SetSettings( *settings ); }