diff options
Diffstat (limited to 'project')
| -rw-r--r-- | project/boost/build.py | 8 | ||||
| -rw-r--r-- | project/build.py | 4 | ||||
| -rw-r--r-- | project/configuration.py | 2 | ||||
| -rw-r--r-- | project/platform.py | 19 |
4 files changed, 9 insertions, 24 deletions
diff --git a/project/boost/build.py b/project/boost/build.py index d662cf8..3ecd22c 100644 --- a/project/boost/build.py +++ b/project/boost/build.py @@ -5,8 +5,8 @@ R'''Build Boost. -The main utility of this script is setting the correct --stagedir parameter -value to avoid name clashes. +The main utility of this script is setting the correct --prefix parameter value +to avoid name clashes. It also facilitates building with different toolsets/for different platforms with the help from the --toolset and --platform parameters. @@ -159,8 +159,8 @@ def _parse_args(argv=None): platform_options = '/'.join(map(str, Platform.all())) configuration_options = '/'.join(map(str, Configuration.all())) - # These are used to put the built libraries into proper stage/ - # subdirectories (to avoid name clashes). + # These are used to put the built libraries into proper installation + # directory subdirectories (to avoid name clashes). parser.add_argument('--platform', metavar='PLATFORM', dest='platforms', nargs='*', type=Platform.parse, default=[], help=f'target platform ({platform_options})') diff --git a/project/build.py b/project/build.py index 88826ed..77eb3ca 100644 --- a/project/build.py +++ b/project/build.py @@ -5,8 +5,8 @@ R'''Build a CMake project. -This script works nicely with boost-build from this package - it will use the -correct --stagedir directory automatically. +This script works nicely with boost-build from this package - it will set the +correct BOOST_ROOT value automatically. Also, it facilitates building with different toolsets/for different platforms with the help from the --toolset and --platform parameters. diff --git a/project/configuration.py b/project/configuration.py index 3a2b2e2..42dedb3 100644 --- a/project/configuration.py +++ b/project/configuration.py @@ -34,7 +34,7 @@ class Configuration(Enum): AFAIK, Boost only supports debug/release, MinSizeRel and RelWithDebInfo are hence mapped to "release". The libraries will still reside in - stage/PLATFORM/CONFIGURATION/lib, if CONFIGURATION is + root/PLATFORM/CONFIGURATION/lib, if CONFIGURATION is MinSizeRel/RelWithDebInfo. ''' if self in (Configuration.MINSIZEREL, Configuration.RELWITHDEBINFO): diff --git a/project/platform.py b/project/platform.py index d82694b..9bd0e58 100644 --- a/project/platform.py +++ b/project/platform.py @@ -76,30 +76,18 @@ class Platform(Enum): raise NotImplementedError(f'unsupported platform: {self}') def installdir(self, configuration): + '''Path to the installation directory inside the Boost build directory.''' if self is Platform.AUTO: if on_windows(): # On Windows, use the host architecture. return Platform.windows_native().installdir(configuration) - # On Linux, the libraries are stored in stage/auto/CONFIGURATION/lib. + # On Linux, the libraries are stored in root/auto/CONFIGURATION/lib. return os.path.join('root', str(self), str(configuration)) - def stagedir(self, configuration): - '''Path to the built libraries inside the Boost build directory.''' - if self is Platform.AUTO: - if on_windows(): - # On Windows, use the host architecture. - return Platform.windows_native().stagedir(configuration) - # On Linux, the libraries are stored in stage/auto/CONFIGURATION/lib. - return os.path.join('stage', str(self), str(configuration)) - def boost_installdir(self, configuration): '''Same as above, but for CMake.''' return self.installdir(configuration) - def boost_librarydir(self, configuration): - '''Same as above, but for CMake; adds /lib/ at the end.''' - return os.path.join(self.stagedir(configuration), 'lib') - def b2_address_model(self): if self is Platform.AUTO and not on_windows(): # On Linux, don't specify the architecture explicitly (it is @@ -110,9 +98,6 @@ class Platform(Enum): def b2_installdir(self, configuration): return [f'--prefix={self.installdir(configuration)}'] - def b2_stagedir(self, configuration): - return [f'--stagedir={self.stagedir(configuration)}'] - def b2_args(self, configuration): args = [] args += self.b2_address_model() |
