Skip to content

Commit 85e9c7f

Browse files
committed
[tool][eclipse]: Add pre-build and post-build step settings
- Add pre-build and post-build steps in the cproject file - Support custom pre-build and post-build steps
1 parent 27bcc3e commit 85e9c7f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tools/targets/eclipse.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,17 @@ def UpdateCproject(env, project, excluding, reset, prj_name):
602602
if config_element is not None:
603603
config_element.set('artifactName', prj_name)
604604

605+
pre_build_step = getattr(rtconfig, 'PRE_BUILD_STEP', None)
606+
post_build_step = getattr(rtconfig, 'POST_BUILD_STEP', None)
607+
608+
if pre_build_step:
609+
config_element.set('prebuildStep', pre_build_step)
610+
print("Setting/Overwriting Pre-build step...")
611+
612+
if post_build_step:
613+
config_element.set('postbuildStep', post_build_step)
614+
print("Setting/Overwriting Post-build step...")
615+
605616
sourceEntries = cconfiguration.find('storageModule/configuration/sourceEntries')
606617
if sourceEntries is not None:
607618
# Call the new global handler function for source entries

0 commit comments

Comments
 (0)