Skip to content

Commit d0fbfb7

Browse files
vgvassilevdevajithvs
authored andcommitted
[runtime-cxxmodules] Adapt the darwin modulemaps to sdk 15.4. (#18231)
* [runtime-cxxmodules] Adapt the darwin modulemaps to sdk 15.4. * [runtime-cxmodules] Use separate modulemap for macOS15.2 * [runtime-cxxmodules] Add overlay entry for MacOSX15.2 --------- Co-authored-by: Devajith Valaparambil Sreeramaswamy <devajith.valaparambil.sreeramaswamy@cern.ch> (cherry picked from commit ff43ae8)
1 parent a65b0a8 commit d0fbfb7

File tree

4 files changed

+2033
-113
lines changed

4 files changed

+2033
-113
lines changed

core/clingutils/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,15 @@ if (runtime_cxxmodules)
120120

121121
# We need to override the default modulemap because instead of producing a
122122
# single std.pcm, produces hundreds of pcms. This changed with sdk 15.3.
123-
if (CMAKE_SYSTEM_NAME MATCHES Darwin AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0.0.15000309)
124-
set(custom_modulemaps ${custom_modulemaps} std_darwin.modulemap)
123+
# we need to patch the modulemap from MacOSX15.2.sdk
124+
if (APPLE)
125+
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0.0.15000309)
126+
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0.0.17000013)
127+
set(custom_modulemaps ${custom_modulemaps} std_darwin.MacOSX15.2.sdk.modulemap)
128+
else()
129+
set(custom_modulemaps ${custom_modulemaps} std_darwin.modulemap)
130+
endif()
131+
endif()
125132
endif()
126133

127134
if (NOT libcxx)

0 commit comments

Comments
 (0)