Skip to content

Commit

Permalink
px_process_params.py: fix for empty cmake scope
Browse files Browse the repository at this point in the history
Hotfix for cmake configs which use include() for the module list (eg.
posix_sitl_ekf2.cmake or snapdragon). In that case the cmake parser did
not find any modules and thus the param list was empty.

The proper fix will be to parse the include() statements correctly.
  • Loading branch information
bkueng committed Jan 6, 2017
1 parent ff560e8 commit 9b3803f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tools/px_process_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,19 @@ def main():
except:
use_scope = False
pass
if use_scope:
if use_scope and len(cmake_scope.scope) > 0:
if not scanner.ScanDir([os.path.join(args.src_path, p) for p in cmake_scope.scope], parser):
sys.exit(1)
else:
else:
if not scanner.ScanDir([args.src_path], parser):
sys.exit(1)
if not parser.Validate():
sys.exit(1)
param_groups = parser.GetParamGroups()

if len(param_groups) == 0:
print("Warning: no parameters found")

# Output to XML file
if args.xml:
if args.verbose: print("Creating XML file " + args.xml)
Expand Down

0 comments on commit 9b3803f

Please sign in to comment.