Commit 7a38c6f1 authored by Manuel Grizonnet's avatar Manuel Grizonnet

Merge branch 'change_cmake_policies' into 'develop'

Update deprecated cmake policies to NEW

See merge request !295
parents 5e5507fe 4ef147f2
......@@ -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()
......
......@@ -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)
......
......@@ -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);
......
......@@ -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);
......
......@@ -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 << " [";
......
......@@ -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 );
}
......
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