Skip to content

Commit

Permalink
Fix CMP0173 policy warning with cmake 3.31 (#110522)
Browse files Browse the repository at this point in the history
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)`:
  • Loading branch information
am11 authored Jan 11, 2025
1 parent 4d92699 commit 0dcffe7
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ if(FEATURE_MERGE_JIT_AND_ENGINE)
endif(FEATURE_MERGE_JIT_AND_ENGINE)

if (CLR_CMAKE_TARGET_OSX)
include(CMakeFindFrameworks)
find_library(FOUNDATION Foundation REQUIRED)
endif()

Expand Down
1 change: 0 additions & 1 deletion src/native/libs/System.Globalization.Native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ include_directories("../Common")

if (GEN_SHARED_LIB)
if (CLR_CMAKE_TARGET_APPLE)
include(CMakeFindFrameworks)
find_library(FOUNDATION Foundation REQUIRED)
endif()

Expand Down
1 change: 0 additions & 1 deletion src/native/libs/System.Native/extra_libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ macro(append_extra_system_libs NativeLibsExtra)
endif ()

if (CLR_CMAKE_TARGET_APPLE)
include(CMakeFindFrameworks)
find_library(FOUNDATION Foundation REQUIRED)
list(APPEND ${NativeLibsExtra} ${FOUNDATION})
endif ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ set(SOURCES

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

include(CMakeFindFrameworks)
find_library(FOUNDATION Foundation REQUIRED)

add_library(ObjectiveC SHARED ${SOURCES})
Expand Down

0 comments on commit 0dcffe7

Please sign in to comment.