[tools] use project's dir basename as default project name

This commit is contained in:
liuchao authored and GuEe-GUI committed 2024-11-20 16:37:32 +08:00
1 parent d826402472
commit e741089270
2 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -77,7 +77,7 @@ jobs:
if: ${{ success() }}
run: |
echo "Test to dist project"
scons --dist -C $TEST_BSP_ROOT
scons --dist --project-name=project -C $TEST_BSP_ROOT
scons --dist-ide -C $TEST_BSP_ROOT
ls $TEST_BSP_ROOT
ls $TEST_BSP_ROOT/dist
+3 -2
View File
@@ -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',