File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
test cases/unit/58 introspect buildoptions Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -1225,7 +1225,9 @@ def process_kwargs(self, kwargs):
12251225 self .resources = resources
12261226 if kwargs .get ('name_prefix' ) is not None :
12271227 name_prefix = kwargs ['name_prefix' ]
1228- if isinstance (name_prefix , list ):
1228+ if isinstance (name_prefix , UnknownValue ):
1229+ pass
1230+ elif isinstance (name_prefix , list ):
12291231 if name_prefix :
12301232 raise InvalidArguments ('name_prefix array must be empty to signify default.' )
12311233 else :
@@ -1235,7 +1237,9 @@ def process_kwargs(self, kwargs):
12351237 self .name_prefix_set = True
12361238 if kwargs .get ('name_suffix' ) is not None :
12371239 name_suffix = kwargs ['name_suffix' ]
1238- if isinstance (name_suffix , list ):
1240+ if isinstance (name_suffix , UnknownValue ):
1241+ pass
1242+ elif isinstance (name_suffix , list ):
12391243 if name_suffix :
12401244 raise InvalidArguments ('name_suffix array must be empty to signify default.' )
12411245 else :
Original file line number Diff line number Diff line change @@ -14,5 +14,13 @@ if r.returncode() != 0
1414 error (' FAILED' )
1515endif
1616
17+ name_prefix = ' lib'
18+ if get_option (' buildtype' ) == ' release'
19+ # ensure that these variables become an UnkownValue
20+ name_prefix = []
21+ endif
22+
23+ static_library (' hello' , ' hello.c' , name_prefix : name_prefix)
24+
1725add_languages (r.stdout().strip(), required : true )
1826add_languages (' afgggergearvearghergervergreaergaergasv' , required : false )
You can’t perform that action at this time.
0 commit comments