diff options
| author | Bernard Xiong <[email protected]> | 2021-03-31 14:15:21 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-03-31 14:15:21 +0800 |
| commit | 259144b2e658d6bdc543afb6b2e88f5461a070b4 (patch) | |
| tree | 7e4e1a241a70330b4f6a4e78d6549c9e68d4873d /tools/eclipse.py | |
| parent | 28ec21671cfd8992b3ad2d6ea48989968ad23e7c (diff) | |
| parent | a15040d3a9175b13486d756eafe0dd03645368da (diff) | |
Merge branch 'master' into master
Diffstat (limited to 'tools/eclipse.py')
| -rw-r--r-- | tools/eclipse.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/eclipse.py b/tools/eclipse.py index 4f3cda92b8..4d5e28e02e 100644 --- a/tools/eclipse.py +++ b/tools/eclipse.py @@ -188,7 +188,8 @@ def HandleToolOption(tools, env, project, reset): options = tool.findall('option') # find all compile options for option in options: - if option.get('id').find('compiler.include.paths') != -1 or option.get('id').find('compiler.option.includepaths') != -1: + option_id = option.get('id') + if ('compiler.include.paths' in option_id) or ('compiler.option.includepaths' in option_id) or ('compiler.tasking.include' in option_id): compile_include_paths_options += [option] elif option.get('id').find('compiler.include.files') != -1 or option.get('id').find('compiler.option.includefiles') != -1 : compile_include_files_options += [option] @@ -448,8 +449,10 @@ def RelativeProjectPath(env, path): def HandleExcludingOption(entry, sourceEntries, excluding): old_excluding = [] if entry != None: - old_excluding = entry.get('excluding').split('|') - sourceEntries.remove(entry) + exclud = entry.get('excluding') + if exclud != None: + old_excluding = entry.get('excluding').split('|') + sourceEntries.remove(entry) value = '' for item in old_excluding: @@ -484,8 +487,9 @@ def UpdateCproject(env, project, excluding, reset, prj_name): HandleToolOption(tools, env, project, reset) sourceEntries = cconfiguration.find('storageModule/configuration/sourceEntries') - entry = sourceEntries.find('entry') - HandleExcludingOption(entry, sourceEntries, excluding) + if sourceEntries != None: + entry = sourceEntries.find('entry') + HandleExcludingOption(entry, sourceEntries, excluding) # update refreshScope if prj_name: prj_name = '/' + prj_name |
