diff options
| author | liuchao <[email protected]> | 2024-11-06 20:37:02 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2024-11-06 17:46:16 -0500 |
| commit | ea75800d5b3be3e63c6304afed8b06a3fdeae289 (patch) | |
| tree | 4cf9edbd647985c77fa7d250f43cde037bb2eb0f /tools | |
| parent | 04686869c75b137d086dc52ce083947d87643dbd (diff) | |
[tools] use project's dir basename as default project name
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/options.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/options.py b/tools/options.py index b77b675612..9b338e7311 100644 --- a/tools/options.py +++ b/tools/options.py @@ -22,8 +22,9 @@ # 2022-04-20 WuGensheng Add Options to SCons # -from SCons.Script import AddOption +from SCons.Script import AddOption, Dir import platform +import os def AddOptions(): ''' ===== Add generic options to SCons ===== ''' @@ -45,7 +46,7 @@ def AddOptions(): AddOption('--project-name', dest = 'project-name', type = 'string', - default = "project", + default = os.path.basename(Dir('#').abspath), help = 'set project name') AddOption('--cscope', dest = 'cscope', |
