Skip to content

Commit 0dcffe7

Browse files
authored
Fix CMP0173 policy warning with cmake 3.31 (#110522)
In some places, where we use `find_library(FOUNDATION`, we don't `include(CMakeFindFrameworks)` while in other places we do. These look like added "just in case". CMake 3.31 has deprecated `include(CMakeFindFrameworks)`:
1 parent 4d92699 commit 0dcffe7

File tree

4 files changed

+0
-4
lines changed

4 files changed

+0
-4
lines changed

src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ if(FEATURE_MERGE_JIT_AND_ENGINE)
186186
endif(FEATURE_MERGE_JIT_AND_ENGINE)
187187

188188
if (CLR_CMAKE_TARGET_OSX)
189-
include(CMakeFindFrameworks)
190189
find_library(FOUNDATION Foundation REQUIRED)
191190
endif()
192191

src/native/libs/System.Globalization.Native/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ include_directories("../Common")
140140

141141
if (GEN_SHARED_LIB)
142142
if (CLR_CMAKE_TARGET_APPLE)
143-
include(CMakeFindFrameworks)
144143
find_library(FOUNDATION Foundation REQUIRED)
145144
endif()
146145

src/native/libs/System.Native/extra_libs.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ macro(append_extra_system_libs NativeLibsExtra)
1313
endif ()
1414

1515
if (CLR_CMAKE_TARGET_APPLE)
16-
include(CMakeFindFrameworks)
1716
find_library(FOUNDATION Foundation REQUIRED)
1817
list(APPEND ${NativeLibsExtra} ${FOUNDATION})
1918
endif ()

src/tests/Interop/ObjectiveC/AutoReleaseTest/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ set(SOURCES
1515

1616
set_source_files_properties(autorelease.m PROPERTIES COMPILE_FLAGS -fno-objc-arc)
1717

18-
include(CMakeFindFrameworks)
1918
find_library(FOUNDATION Foundation REQUIRED)
2019

2120
add_library(ObjectiveC SHARED ${SOURCES})

0 commit comments

Comments
 (0)