Skip to content

Commit

Permalink
Avoid warning of deprecated cmake 3.5 by removing mention of cmake 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Nov 20, 2023
1 parent b6c74f6 commit 562074a
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions cmake/ecbuild_project.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ macro( project _project_name )
ecbuild_critical("Please specify a version for project ${_project_name}")
endif()

cmake_policy(PUSH)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) # for using IN_LIST
cmake_policy(SET CMP0057 NEW) # for using IN_LIST

unset( _require_LANGUAGES )
foreach( _lang C CXX Fortran )
if( ${_lang} IN_LIST _ecbuild_${_project_name}_UNPARSED_ARGUMENTS )
Expand All @@ -61,8 +57,6 @@ macro( project _project_name )
list( INSERT _ecbuild_${_project_name}_UNPARSED_ARGUMENTS 0 "LANGUAGES" )
endif()

cmake_policy(POP)

if( ${_project_name}_VERSION_STR )
cmake_policy(SET CMP0048 NEW )
_project( ${_project_name} VERSION ${${_project_name}_VERSION} ${_ecbuild_${_project_name}_UNPARSED_ARGUMENTS} )
Expand All @@ -82,9 +76,6 @@ macro( project _project_name )
ecbuild_debug( "CMake project(${_project_name}) ")

if(ECBUILD_2_COMPAT)
cmake_policy(PUSH)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) # for using IN_LIST
cmake_policy(SET CMP0057 NEW) # for using IN_LIST

unset( _args )
foreach( arg ${ARGN} )
Expand All @@ -97,8 +88,6 @@ macro( project _project_name )
set(_cmp0048_val OLD)
endif()

cmake_policy(POP)

cmake_policy(SET CMP0048 ${_cmp0048_val} )
unset(_cmp0048_val)
endif()
Expand Down

0 comments on commit 562074a

Please sign in to comment.