Skip to content

Commit

Permalink
test release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
qiao-bo committed May 8, 2022
1 parent 858cdc9 commit ec6fef1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,28 @@ def get_cmake_args():

if (os.getenv('DEBUG', '0') in ('1', 'ON')):
cfg = 'Debug'
elif (os.getenv('RELEASE', '0') in ('1', 'ON')):
cfg = 'Release'
elif (os.getenv('RELWITHDEBINFO', '0') in ('1', 'ON')):
cfg = 'RelWithDebInfo'
elif (os.getenv('MINSIZEREL', '0') in ('1', 'ON')):
cfg = 'MinSizeRel'
else:
cfg = None

build_options = []
if cfg:
build_options.extend(['--build-type', cfg])
if sys.platform == 'win32':
build_options.extend(['-G', 'Ninja', '--skip-generator-test'])
sys.argv[2:2] = build_options
print("=================[start]===========")
print("=================[]===========")
print("=================[]===========")
print(sys.argv)
print("=================[]===========")
print(build_options)
print("=================[end]===========")

cmake_args += [
f'-DTI_VERSION_MAJOR={TI_VERSION_MAJOR}',
Expand Down

0 comments on commit ec6fef1

Please sign in to comment.