mirror of
https://github.com/GayPizzaSpecifications/cxx-swift-interop.git
synced 2025-08-03 13:11:31 +00:00
even less bad
This commit is contained in:
@ -1,3 +1,3 @@
|
|||||||
# C++ to Swift interop
|
# Swift into C++ interop
|
||||||
|
|
||||||
This is a C++ backend which is callable from Swift code. It is also possible to do bidirectional C++ to Swift, see https://github.com/apple/swift-cmake-examples/tree/main/3_bidirectional_cxx_interop
|
This is a C++ backend which is callable from Swift code. It is also possible to do bidirectional C++ to Swift, see https://github.com/apple/swift-cmake-examples/tree/main/3_bidirectional_cxx_interop
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
add_library(CppBackend STATIC backend.h backend.cpp)
|
add_library(CppBackend STATIC backend.h backend.cpp)
|
||||||
|
set_property(TARGET CppBackend PROPERTY Swift_MODULE_NAME "CppBackend")
|
||||||
|
set_property(TARGET CppBackend PROPERTY CXX_STANDARD 20)
|
||||||
|
|
||||||
set_target_properties(CppBackend PROPERTIES Swift_MODULE_NAME "CppBackend")
|
|
||||||
target_compile_options(CppBackend PUBLIC "$<$<COMPILE_LANGUAGE:Swift>:-cxx-interoperability-mode=default>")
|
target_compile_options(CppBackend PUBLIC "$<$<COMPILE_LANGUAGE:Swift>:-cxx-interoperability-mode=default>")
|
||||||
target_include_directories(CppBackend PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
target_include_directories(CppBackend PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
Reference in New Issue
Block a user