File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1- # Copyright (C) 2023-2024 Intel Corporation
1+ # Copyright (C) 2023-2025 Intel Corporation
22# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
@@ -161,6 +161,18 @@ endif()
161161
162162if (UMF_LINK_HWLOC_STATICALLY)
163163 add_dependencies (umf ${UMF_HWLOC_NAME} )
164+ # On Darwin, link with the IOKit and Foundation frameworks, if they are
165+ # available in the system. This is to comply with hwloc which links these,
166+ # if available. There is no option to disable these frameworks on Darwin
167+ # hwloc builds.
168+ if (MACOSX)
169+ find_library (IOKIT_LIBRARY IOKit)
170+ find_library (FOUNDATION_LIBRARY Foundation)
171+ if (IOKIT_LIBRARY OR FOUNDATION_LIBRARY)
172+ target_link_libraries (umf PRIVATE ${IOKIT_LIBRARY}
173+ ${FOUNDATION_LIBRARY} )
174+ endif ()
175+ endif ()
164176endif ()
165177
166178target_link_directories (umf PRIVATE ${UMF_PRIVATE_LIBRARY_DIRS} )
You can’t perform that action at this time.
0 commit comments