From 20d5e77a270639a124fea587bb68b2fb6a5356fc Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Mon, 5 Nov 2018 15:58:24 +1100 Subject: CPack: Rename Ext generator to External Ext and External were used inconsistently in the code and the docs. This change converts all uses of Ext to External, including within variable names used by the generator. --- Modules/Internal/CPack/CPackExt.cmake | 53 ------------------------------ Modules/Internal/CPack/CPackExternal.cmake | 53 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 53 deletions(-) delete mode 100644 Modules/Internal/CPack/CPackExt.cmake create mode 100644 Modules/Internal/CPack/CPackExternal.cmake (limited to 'Modules') diff --git a/Modules/Internal/CPack/CPackExt.cmake b/Modules/Internal/CPack/CPackExt.cmake deleted file mode 100644 index e52d978a1e..0000000000 --- a/Modules/Internal/CPack/CPackExt.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -if(NOT "${CPACK_EXT_REQUESTED_VERSIONS}" STREQUAL "") - unset(_found_major) - - foreach(_req_version IN LISTS CPACK_EXT_REQUESTED_VERSIONS) - if(_req_version MATCHES "^([0-9]+)\\.([0-9]+)$") - set(_req_major "${CMAKE_MATCH_1}") - set(_req_minor "${CMAKE_MATCH_2}") - - foreach(_known_version IN LISTS CPACK_EXT_KNOWN_VERSIONS) - string(REGEX MATCH - "^([0-9]+)\\.([0-9]+)$" - _known_version_dummy - "${_known_version}" - ) - - set(_known_major "${CMAKE_MATCH_1}") - set(_known_minor "${CMAKE_MATCH_2}") - - if(_req_major EQUAL _known_major AND NOT _known_minor LESS _req_minor) - set(_found_major "${_known_major}") - set(_found_minor "${_known_minor}") - break() - endif() - endforeach() - - if(DEFINED _found_major) - break() - endif() - endif() - endforeach() - - if(DEFINED _found_major) - set(CPACK_EXT_SELECTED_MAJOR "${_found_major}") - set(CPACK_EXT_SELECTED_MINOR "${_found_minor}") - set(CPACK_EXT_SELECTED_VERSION "${_found_major}.${_found_minor}") - else() - message(FATAL_ERROR - "Could not find a suitable version in CPACK_EXT_REQUESTED_VERSIONS" - ) - endif() -else() - list(GET CPACK_EXT_KNOWN_VERSIONS 0 CPACK_EXT_SELECTED_VERSION) - string(REGEX MATCH - "^([0-9]+)\\.([0-9]+)$" - _dummy - "${CPACK_EXT_SELECTED_VERSION}" - ) - set(CPACK_EXT_SELECTED_MAJOR "${CMAKE_MATCH_1}") - set(CPACK_EXT_SELECTED_MINOR "${CMAKE_MATCH_2}") -endif() diff --git a/Modules/Internal/CPack/CPackExternal.cmake b/Modules/Internal/CPack/CPackExternal.cmake new file mode 100644 index 0000000000..e4d055a2db --- /dev/null +++ b/Modules/Internal/CPack/CPackExternal.cmake @@ -0,0 +1,53 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +if(NOT "${CPACK_EXTERNAL_REQUESTED_VERSIONS}" STREQUAL "") + unset(_found_major) + + foreach(_req_version IN LISTS CPACK_EXTERNAL_REQUESTED_VERSIONS) + if(_req_version MATCHES "^([0-9]+)\\.([0-9]+)$") + set(_req_major "${CMAKE_MATCH_1}") + set(_req_minor "${CMAKE_MATCH_2}") + + foreach(_known_version IN LISTS CPACK_EXTERNAL_KNOWN_VERSIONS) + string(REGEX MATCH + "^([0-9]+)\\.([0-9]+)$" + _known_version_dummy + "${_known_version}" + ) + + set(_known_major "${CMAKE_MATCH_1}") + set(_known_minor "${CMAKE_MATCH_2}") + + if(_req_major EQUAL _known_major AND NOT _known_minor LESS _req_minor) + set(_found_major "${_known_major}") + set(_found_minor "${_known_minor}") + break() + endif() + endforeach() + + if(DEFINED _found_major) + break() + endif() + endif() + endforeach() + + if(DEFINED _found_major) + set(CPACK_EXTERNAL_SELECTED_MAJOR "${_found_major}") + set(CPACK_EXTERNAL_SELECTED_MINOR "${_found_minor}") + set(CPACK_EXTERNAL_SELECTED_VERSION "${_found_major}.${_found_minor}") + else() + message(FATAL_ERROR + "Could not find a suitable version in CPACK_EXTERNAL_REQUESTED_VERSIONS" + ) + endif() +else() + list(GET CPACK_EXTERNAL_KNOWN_VERSIONS 0 CPACK_EXTERNAL_SELECTED_VERSION) + string(REGEX MATCH + "^([0-9]+)\\.([0-9]+)$" + _dummy + "${CPACK_EXTERNAL_SELECTED_VERSION}" + ) + set(CPACK_EXTERNAL_SELECTED_MAJOR "${CMAKE_MATCH_1}") + set(CPACK_EXTERNAL_SELECTED_MINOR "${CMAKE_MATCH_2}") +endif() -- cgit v1.2.1