summaryrefslogtreecommitdiffstats
path: root/Tests/SwiftMixLib/lib.c
diff options
context:
space:
mode:
authorEvan Wilde <etceterawilde@gmail.com>2022-09-12 22:15:24 (GMT)
committerEvan Wilde <etceterawilde@gmail.com>2022-09-19 18:37:48 (GMT)
commitf6ff19cc9d2ce51791f32b7e4fd0ad6d917a00cc (patch)
treecff84e33592c04b1a7f5e3c8625aaf2af378ffa6 /Tests/SwiftMixLib/lib.c
parent399343486f129f28b61683dbd95bec4ff16e60a0 (diff)
downloadCMake-f6ff19cc9d2ce51791f32b7e4fd0ad6d917a00cc.zip
CMake-f6ff19cc9d2ce51791f32b7e4fd0ad6d917a00cc.tar.gz
CMake-f6ff19cc9d2ce51791f32b7e4fd0ad6d917a00cc.tar.bz2
Tests: Add mixed Swift+CXX source test case
This test ensures we can configure and build mixed source binaries. The test configures, but fails to verify due to multiple targets emitting the `lib.c.o` and `lib.cpp.o` outputs. Both the clang build step and the swift link step report that they emit the `lib.c.o` and `lib.cpp.o` outputs. The `.o`'s are emitted by clang, not by swift.
Diffstat (limited to 'Tests/SwiftMixLib/lib.c')
-rw-r--r--Tests/SwiftMixLib/lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/SwiftMixLib/lib.c b/Tests/SwiftMixLib/lib.c
new file mode 100644
index 0000000..8eca512
--- /dev/null
+++ b/Tests/SwiftMixLib/lib.c
@@ -0,0 +1,4 @@
+int add_int(int a, int b)
+{
+ return a + b;
+}