mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
Meta: Apply cxx-interop settings to swift targets directly
Instead of using a global setting, let's set this per-target. This prevents conflicts when importing third-party dependencies that do not tolerate the mode being "default".
This commit is contained in:
parent
9ab17414ce
commit
062e687289
Notes:
github-actions[bot]
2024-08-29 03:28:42 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/062e6872893 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1202
1 changed files with 1 additions and 2 deletions
|
@ -16,8 +16,6 @@ endif()
|
|||
include(${CMAKE_CURRENT_LIST_DIR}/InitializeSwift.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/GenerateSwiftHeader.cmake)
|
||||
|
||||
add_compile_options("SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc -std=c++23 -cxx-interoperability-mode=default>")
|
||||
|
||||
# FIXME: https://gitlab.kitware.com/cmake/cmake/-/issues/26174
|
||||
if (APPLE)
|
||||
set(CMAKE_Swift_COMPILER_TARGET "${CMAKE_SYSTEM_PROCESSOR}-apple-macosx${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||
|
@ -42,6 +40,7 @@ function(add_swift_target_properties target_name)
|
|||
cmake_parse_arguments(PARSE_ARGV 1 SWIFT_TARGET "" "" "LAGOM_LIBRARIES")
|
||||
|
||||
target_compile_features(${target_name} PUBLIC cxx_std_${CMAKE_CXX_STANDARD})
|
||||
target_compile_options(${target_name} PUBLIC "SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xcc -std=c++23 -cxx-interoperability-mode=default>")
|
||||
|
||||
string(REPLACE "Lib" "" module_name ${target_name})
|
||||
|
||||
|
|
Loading…
Reference in a new issue