Commit f7c9e679 authored by Antoine Regimbeau's avatar Antoine Regimbeau

No need to check if we are with cmake > 2.8

parent 29680241
Pipeline #2133 passed with stages
in 5 minutes and 18 seconds
......@@ -96,24 +96,22 @@ macro( otb_module_headertest _name )
# We check to see if the headers are changed. If so, remove the header test
# source files so they are regenerated.
if( ${CMAKE_VERSION} VERSION_GREATER 2.8.6 ) # for string( MD5
set( _headers_list_md5 "${${_name}_BINARY_DIR}/test/CMakeFiles/HeadersList.md5" )
list( SORT _header_files )
string( MD5 _new_md5 "${_header_files}" )
set( _regenerate_sources FALSE )
if( NOT EXISTS "${_headers_list_md5}" )
set( _headers_list_md5 "${${_name}_BINARY_DIR}/test/CMakeFiles/HeadersList.md5" )
list( SORT _header_files )
string( MD5 _new_md5 "${_header_files}" )
set( _regenerate_sources FALSE )
if( NOT EXISTS "${_headers_list_md5}" )
set( _regenerate_sources TRUE )
else()
file( READ "${_headers_list_md5}" _old_md5 )
if( NOT ("${_old_md5}" STREQUAL "${_new_md5}"))
set( _regenerate_sources TRUE )
else()
file( READ "${_headers_list_md5}" _old_md5 )
if( NOT ("${_old_md5}" STREQUAL "${_new_md5}"))
set( _regenerate_sources TRUE )
endif()
endif()
file( WRITE "${_headers_list_md5}" "${_new_md5}" )
if( ${_regenerate_sources} )
file( REMOVE ${_outputs} )
endif()
endif()
file( WRITE "${_headers_list_md5}" "${_new_md5}" )
if( ${_regenerate_sources} )
file( REMOVE ${_outputs} )
endif()
set( _test_num 1 )
foreach( _header_test_src ${_outputs} )
......
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