mirror of
https://github.com/GayPizzaSpecifications/cxx-swift-interop.git
synced 2025-08-02 12:50:54 +00:00
even less bad
This commit is contained in:
parent
34bf06ab87
commit
163acbf1b0
@ -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
|
||||
|
@ -1,5 +1,6 @@
|
||||
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_include_directories(CppBackend PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
Loading…
Reference in New Issue
Block a user