File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ struct PCFileFinder {
4545
4646 /// Cached results of locations `pkg-config` will search for `.pc` files
4747 private( set) static var pkgConfigPaths : [ AbsolutePath ] ? // FIXME: @testable(internal)
48+ private static var shouldEmitPkgConfigPathsDiagnostic = false
4849
4950 /// The built-in search path list.
5051 ///
@@ -75,7 +76,7 @@ struct PCFileFinder {
7576 args: pkgConfigPath, " --variable " , " pc_path " , " pkg-config " ) . spm_chomp ( )
7677 PCFileFinder . pkgConfigPaths = searchPaths. split ( separator: " : " ) . map ( { AbsolutePath ( String ( $0) ) } )
7778 } catch {
78- diagnostics . emit ( data : PkgConfigExecutionDiagnostic ( ) )
79+ PCFileFinder . shouldEmitPkgConfigPathsDiagnostic = true
7980 PCFileFinder . pkgConfigPaths = [ ]
8081 }
8182 }
@@ -95,6 +96,10 @@ struct PCFileFinder {
9596 return pcFile
9697 }
9798 }
99+ if PCFileFinder . shouldEmitPkgConfigPathsDiagnostic {
100+ PCFileFinder . shouldEmitPkgConfigPathsDiagnostic = false
101+ diagnostics. emit ( data: PkgConfigExecutionDiagnostic ( ) )
102+ }
98103 throw PkgConfigError . couldNotFindConfigFile
99104 }
100105}
You can’t perform that action at this time.
0 commit comments