aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-03-29 12:29:36 +0000
committerEgor Tensin <Egor.Tensin@gmail.com>2020-03-29 12:29:36 +0000
commit53e87e090a87fb14c480e4ed435b3c05da4a1efb (patch)
tree3e5248c3cae1f345a1b30ebb8a20a1aeef0ecb68 /project
parentproject.cmake: insignificant refactoring (diff)
downloadcmake-common-53e87e090a87fb14c480e4ed435b3c05da4a1efb.tar.gz
cmake-common-53e87e090a87fb14c480e4ed435b3c05da4a1efb.zip
project.boost: -d0 by default
Diffstat (limited to 'project')
-rw-r--r--project/boost/build.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/project/boost/build.py b/project/boost/build.py
index 541e2ba..e17af32 100644
--- a/project/boost/build.py
+++ b/project/boost/build.py
@@ -29,6 +29,13 @@ from project.platform import Platform
import project.utils
+DEFAULT_PLATFORMS = Platform.all()
+DEFAULT_CONFIGURATIONS = Configuration.all()
+DEFAULT_LINK = Linkage.all()
+DEFAULT_RUNTIME_LINK = Linkage.STATIC
+DEFAULT_B2_ARGS = ['-d0']
+
+
class BuildParameters:
def __init__(self, boost_dir, build_dir=None, platforms=None, configurations=None, link=None,
runtime_link=None, b2_args=None):
@@ -36,11 +43,14 @@ class BuildParameters:
boost_dir = project.utils.normalize_path(boost_dir)
if build_dir is not None:
build_dir = project.utils.normalize_path(build_dir)
- platforms = platforms or Platform.all()
- configurations = configurations or Configuration.all()
- link = link or Linkage.all()
- runtime_link = runtime_link or Linkage.STATIC
- b2_args = b2_args or []
+ platforms = platforms or DEFAULT_PLATFORMS
+ configurations = configurations or DEFAULT_CONFIGURATIONS
+ link = link or DEFAULT_LINK
+ runtime_link = runtime_link or DEFAULT_RUNTIME_LINK
+ if b2_args:
+ b2_args = DEFAULT_B2_ARGS + b2_args
+ else:
+ b2_args = DEFAULT_B2_ARGS
self.boost_dir = boost_dir
self.stage_dir = 'stage'
@@ -169,7 +179,7 @@ def _parse_args(argv=None):
# This is used to omit runtime-link=static I'd have to otherwise use a lot,
# plus the script validates the link= and runtime-link= combinations.
parser.add_argument('--runtime-link', metavar='LINKAGE',
- type=Linkage.parse, default=Linkage.STATIC,
+ type=Linkage.parse, default=DEFAULT_RUNTIME_LINK,
help=f'how the libraries link to the runtime ({"/".join(map(str, Linkage))})')
parser.add_argument('--build', metavar='DIR', dest='build_dir',