CMP0054: Remove support for OLD behavior

This commit is contained in:
Brad King
2024-12-09 18:50:54 -05:00
parent 292aaffb78
commit 90d814f024
80 changed files with 15 additions and 794 deletions
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(NOT _CMAKE_SYSTEM_LINKER_TYPE)
block(SCOPE_FOR VARIABLES)
execute_process(COMMAND "${CMAKE_LINKER}" --version
@@ -18,5 +15,3 @@ if(NOT _CMAKE_SYSTEM_LINKER_TYPE)
endif()
endblock()
endif()
endblock()
@@ -2,14 +2,8 @@
# file Copyright.txt or https://cmake.org/licensing for details.
include(Platform/Linker/BSD-Linker-Initialize)
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(_CMAKE_SYSTEM_LINKER_TYPE STREQUAL "GNU")
include(Platform/Linker/FreeBSD-GNU-ASM)
else()
include(Platform/Linker/FreeBSD-LLD-ASM)
endif()
endblock()
-5
View File
@@ -3,13 +3,8 @@
include(Platform/Linker/BSD-Linker-Initialize)
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(_CMAKE_SYSTEM_LINKER_TYPE STREQUAL "GNU")
include(Platform/Linker/FreeBSD-GNU-C)
else()
include(Platform/Linker/FreeBSD-LLD-C)
endif()
endblock()
@@ -3,13 +3,8 @@
include(Platform/Linker/BSD-Linker-Initialize)
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(_CMAKE_SYSTEM_LINKER_TYPE STREQUAL "GNU")
include(Platform/Linker/FreeBSD-GNU-CXX)
else()
include(Platform/Linker/FreeBSD-LLD-CXX)
endif()
endblock()
@@ -3,13 +3,8 @@
include(Platform/Linker/BSD-Linker-Initialize)
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(_CMAKE_SYSTEM_LINKER_TYPE STREQUAL "GNU")
include(Platform/Linker/FreeBSD-GNU-Fortran)
else()
include(Platform/Linker/FreeBSD-LLD-Fortran)
endif()
endblock()
-5
View File
@@ -5,9 +5,6 @@
# This module is shared by multiple languages; use include blocker.
include_guard()
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
# WHOLE_ARCHIVE Feature for LINK_LIBRARY generator expression
## check linker capabilities
function(__cmake_set_whole_archive_feature __linker)
@@ -47,5 +44,3 @@ endfunction()
## Configure system linker
__cmake_set_whole_archive_feature("${CMAKE_LINKER}")
endblock()
@@ -3,13 +3,8 @@
include(Platform/Linker/BSD-Linker-Initialize)
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(_CMAKE_SYSTEM_LINKER_TYPE STREQUAL "GNU")
include(Platform/Linker/OpenBSD-GNU-ASM)
else()
include(Platform/Linker/OpenBSD-LLD-ASM)
endif()
endblock()
-5
View File
@@ -3,13 +3,8 @@
include(Platform/Linker/BSD-Linker-Initialize)
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(_CMAKE_SYSTEM_LINKER_TYPE STREQUAL "GNU")
include(Platform/Linker/OpenBSD-GNU-C)
else()
include(Platform/Linker/OpenBSD-LLD-C)
endif()
endblock()
@@ -3,13 +3,8 @@
include(Platform/Linker/BSD-Linker-Initialize)
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(_CMAKE_SYSTEM_LINKER_TYPE STREQUAL "GNU")
include(Platform/Linker/OpenBSD-GNU-CXX)
else()
include(Platform/Linker/OpenBSD-LLD-CXX)
endif()
endblock()
@@ -3,13 +3,8 @@
include(Platform/Linker/BSD-Linker-Initialize)
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(_CMAKE_SYSTEM_LINKER_TYPE STREQUAL "GNU")
include(Platform/Linker/OpenBSD-GNU-Fortran)
else()
include(Platform/Linker/OpenBSD-LLD-Fortran)
endif()
endblock()
@@ -5,9 +5,6 @@
# This module is shared by multiple languages; use include blocker.
include_guard()
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
macro(__sunos_linker_solaris lang)
set(CMAKE_${lang}_PLATFORM_LINKER_ID Solaris)
# Features for LINK_LIBRARY generator expression
@@ -24,5 +21,3 @@ macro(__sunos_linker_solaris lang)
set(CMAKE_${lang}_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED TRUE)
set(CMAKE_${lang}_LINK_LIBRARY_WHOLE_ARCHIVE_ATTRIBUTES LIBRARY_TYPE=STATIC DEDUPLICATION=YES OVERRIDE=DEFAULT)
endmacro()
endblock()
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(CMAKE_ASM_SIMULATE_ID STREQUAL "MSVC")
# MSVC is the default linker
include(Platform/Linker/Windows-MSVC-ASM)
@@ -11,5 +8,3 @@ else()
# GNU is the default linker
include(Platform/Linker/Windows-GNU-ASM)
endif()
endblock()
-5
View File
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(CMAKE_C_SIMULATE_ID STREQUAL "MSVC")
# MSVC is the default linker
include(Platform/Linker/Windows-MSVC-C)
@@ -11,5 +8,3 @@ else()
# GNU is the default linker
include(Platform/Linker/Windows-GNU-C)
endif()
endblock()
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
# MSVC is the default linker
include(Platform/Linker/Windows-MSVC-CXX)
@@ -11,5 +8,3 @@ else()
# GNU is the default linker
include(Platform/Linker/Windows-GNU-CXX)
endif()
endblock()
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(CMAKE_Fortran_SIMULATE_ID STREQUAL "MSVC")
# MSVC is the default linker
include(Platform/Linker/Windows-MSVC-Fortran)
@@ -11,5 +8,3 @@ else()
# GNU is the default linker
include(Platform/Linker/Windows-GNU-Fortran)
endif()
endblock()
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(CMAKE_HIP_SIMULATE_ID STREQUAL "MSVC")
# MSVC is the default linker
include(Platform/Linker/Windows-MSVC-HIP)
@@ -11,5 +8,3 @@ else()
# GNU is the default linker
include(Platform/Linker/Windows-GNU-HIP)
endif()
endblock()
@@ -5,9 +5,6 @@
# This module is shared by multiple languages; use include blocker.
include_guard()
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
macro(__windows_linker_lld lang)
set(CMAKE_${lang}_PLATFORM_LINKER_ID LLD)
# Features for LINK_LIBRARY generator expression
@@ -21,5 +18,3 @@ macro(__windows_linker_lld lang)
__windows_linker_msvc(${lang})
endif()
endmacro()
endblock()
@@ -5,9 +5,6 @@
# This module is shared by multiple languages; use include blocker.
include_guard()
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
# Features for LINK_LIBRARY generator expression
if(MSVC_VERSION GREATER "1900")
## WHOLE_ARCHIVE: Force loading all members of an archive
@@ -32,5 +29,3 @@ macro(__windows_linker_msvc lang)
endif()
endif()
endmacro()
endblock()
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(CMAKE_ASM_SIMULATE_ID STREQUAL "MSVC")
# MSVC is the default linker
include(Platform/Linker/WindowsPhone-MSVC-ASM)
@@ -11,5 +8,3 @@ else()
# GNU is the default linker
include(Platform/Linker/WindowsPhone-GNU-ASM)
endif()
endblock()
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(CMAKE_C_SIMULATE_ID STREQUAL "MSVC")
# MSVC is the default linker
include(Platform/Linker/WindowsPhone-MSVC-C)
@@ -11,5 +8,3 @@ else()
# GNU is the default linker
include(Platform/Linker/WindowsPhone-GNU-C)
endif()
endblock()
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
# MSVC is the default linker
include(Platform/Linker/WindowsPhone-MSVC-CXX)
@@ -11,5 +8,3 @@ else()
# GNU is the default linker
include(Platform/Linker/WindowsPhone-GNU-CXX)
endif()
endblock()
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(CMAKE_ASM_SIMULATE_ID STREQUAL "MSVC")
# MSVC is the default linker
include(Platform/Linker/WindowsStore-MSVC-ASM)
@@ -11,5 +8,3 @@ else()
# GNU is the default linker
include(Platform/Linker/WindowsStore-GNU-ASM)
endif()
endblock()
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(CMAKE_C_SIMULATE_ID STREQUAL "MSVC")
# MSVC is the default linker
include(Platform/Linker/WindowsStore-MSVC-C)
@@ -11,5 +8,3 @@ else()
# GNU is the default linker
include(Platform/Linker/WindowsStore-GNU-C)
endif()
endblock()
@@ -1,9 +1,6 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
block(SCOPE_FOR POLICIES)
cmake_policy(SET CMP0054 NEW)
if(CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
# MSVC is the default linker
include(Platform/Linker/WindowsStore-MSVC-CXX)
@@ -11,5 +8,3 @@ else()
# GNU is the default linker
include(Platform/Linker/WindowsStore-GNU-CXX)
endif()
endblock()