mconf: Fixed crash for variables in targets (closes #4960)
This commit is contained in:
parent
8c6d6393f2
commit
4bf1a352cc
|
@ -142,10 +142,11 @@ class IntrospectionInterpreter(AstInterpreter):
|
|||
}]
|
||||
|
||||
def build_target(self, node, args, kwargs, targetclass):
|
||||
args = self.flatten_args(args)
|
||||
if not args:
|
||||
return
|
||||
kwargs = self.flatten_kwargs(kwargs, True)
|
||||
name = self.flatten_args(args)[0]
|
||||
name = args[0]
|
||||
srcqueue = [node]
|
||||
if 'sources' in kwargs:
|
||||
srcqueue += kwargs['sources']
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
printf("Hello World");
|
||||
return 0;
|
||||
}
|
|
@ -2,6 +2,11 @@ project('introspect buildargs', ['c'], default_options: ['c_std=c11', 'cpp_std=c
|
|||
|
||||
subA = subproject('projectA')
|
||||
|
||||
target_name = 'MAIN'
|
||||
target_src = ['main.c']
|
||||
|
||||
executable(target_name, target_src)
|
||||
|
||||
r = run_command(find_program('c_compiler.py'))
|
||||
if r.returncode() != 0
|
||||
error('FAILED')
|
||||
|
|
Loading…
Reference in New Issue