The way the tracking is currently done it works if no new subprojects are added to a configured build directory. For cases where we want to add a new subproject, it fails because we don't initialize builtins for that subproject. This corrects that by checking to see if the subproject already exists, and if it doesn't initializes the bultins for it. Fixes: #8421pull/8422/head
parent
ec5fe58e6d
commit
e079553959
6 changed files with 35 additions and 1 deletions
@ -0,0 +1,7 @@ |
||||
# SPDX-license-identifier: Apache-2.0 |
||||
# Copyright © 2021 Intel Corporation |
||||
project('existing project with new subproject', 'c') |
||||
|
||||
if get_option('use-sub') |
||||
dep = subproject('sub') |
||||
endif |
@ -0,0 +1,3 @@ |
||||
# SPDX-license-identifier: Apache-2.0 |
||||
# Copyright © 2021 Intel Corporation |
||||
option('use-sub', type : 'boolean', value : false) |
@ -0,0 +1,6 @@ |
||||
/* SPDX-license-identifier: Apache-2.0 */ |
||||
/* Copyright © 2021 Intel Corporation */ |
||||
|
||||
int func(void) { |
||||
return 1; |
||||
} |
@ -0,0 +1,7 @@ |
||||
# SPDX-license-identifier: Apache-2.0 |
||||
# Copyright © 2021 Intel Corporation |
||||
project('new subproject', 'c') |
||||
|
||||
l = library('foo', 'foo.c') |
||||
|
||||
dep = declare_dependency(link_with : l) |
Loading…
Reference in new issue