-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add include dir from a clang module into the build args.
Each clang module has public `include` dir. When building current module then it typically works as-is, but when a module has non-standard source location, then explicit include of `include` is necessary.
- Loading branch information
1 parent
083840e
commit 8469311
Showing
8 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// swift-tools-version: 6.0 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Sample", | ||
products: [ | ||
.library( | ||
name: "Sample", | ||
targets: ["Sample"] | ||
), | ||
], | ||
targets: [ | ||
.target( | ||
name: "CSample", | ||
sources: ["./vendorsrc/src"], | ||
cSettings: [ | ||
.headerSearchPath("./vendorsrc/include"), | ||
] | ||
), | ||
.target( | ||
name: "Sample", | ||
dependencies: ["CSample"] | ||
), | ||
] | ||
) |
3 changes: 3 additions & 0 deletions
3
Fixtures/Miscellaneous/APIDiff/CIncludePath/Sources/CSample/include/CSample.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
#include "config.h" | ||
#include "../vendorsrc/include/vendor.h" |
1 change: 1 addition & 0 deletions
1
Fixtures/Miscellaneous/APIDiff/CIncludePath/Sources/CSample/include/config.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#define HAVE_VENDOR_CONFIG |
2 changes: 2 additions & 0 deletions
2
Fixtures/Miscellaneous/APIDiff/CIncludePath/Sources/CSample/vendorsrc/include/vendor.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
#include "config.h" |
6 changes: 6 additions & 0 deletions
6
Fixtures/Miscellaneous/APIDiff/CIncludePath/Sources/CSample/vendorsrc/src/vendor.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "vendor.h" | ||
|
||
int vendor__func(int n) | ||
{ | ||
return 0; | ||
} |
1 change: 1 addition & 0 deletions
1
Fixtures/Miscellaneous/APIDiff/CIncludePath/Sources/Sample/Sample.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import CSample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters