forked from mesonbuild/meson
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a problem when anyone actually tries to use a non-found dependency
Make not-found dependency object identically to prior to PR mesonbuild#2615 Extend test case to cover uses of the not-found dependency object Fixes mesonbuild#2872 Also, prevent direct instantation of class Dependency, since BuildTarget.add_deps() rejects that. It might be better to fix BuildTarget.add_deps() and look for any other similar problems...
- Loading branch information
1 parent
65f78a7
commit cafd77b
Showing
6 changed files
with
17 additions
and
4 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
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
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
project('dep-test') | ||
project('dep-test', 'c') | ||
|
||
dep = dependency('', required:false) | ||
if dep.found() | ||
error('not-found dependency was found') | ||
endif | ||
|
||
assert(dep.type_name() == 'not-found', 'dependency should be of type "not-found" not ' + dep.type_name()) | ||
|
||
library('testlib', 'testlib.c', dependencies: [dep]) | ||
subdir('sub', if_found: dep) |
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 @@ | ||
error('should be disabled by subdir(if_found:)') |
Empty file.