Skip to content

Commit 32ed31c

Browse files
committed
Add comment explaining -iquote vs -I and discovery of external deps
1 parent ca48afb commit 32ed31c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Sources/Build/describe().swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,14 @@ public func describe(prefix: String, _ conf: Configuration, _ modules: [Module],
133133

134134
for case let dep as ClangModule in module.dependencies {
135135
let includeFlag: String
136-
if dep.path.parentDirectory.parentDirectory.basename == "Packages" { //Do better
136+
//add `-iquote` argument to the include directory of every target in the package in the
137+
//transitive closure of the target being built allowing the use of `#include "..."`
138+
//add `-I` argument to the include directory of every target outside the package in the
139+
//transitive closure of the target being built allowing the use of `#include <...>`
140+
//FIXME: To detect external deps we're checking if their path's parent.parent directory
141+
//is `Packages` as external deps will get copied to `Packages` dir. There should be a
142+
//better way to do this.
143+
if dep.path.parentDirectory.parentDirectory.basename == "Packages" {
137144
includeFlag = "-I"
138145
} else {
139146
includeFlag = "-iquote"

0 commit comments

Comments
 (0)