Boost logo

Boost :

From: Дмитрий Архипов (grisumbras_at_[hidden])
Date: 2024-03-23 13:58:43


сб, 23 мар. 2024 г. в 01:24, Hassan Sajjad <hassan.sajjad069_at_[hidden]>:
>
> Hi.
>
> Yes. You need to edit the hmake.cpp to define the new configuration. You can create custom configurations very easily e.g. a configuration in which half the targets are built with debug symbols while the other half are not. And you don't need to build each configuration manually. One hbuild command in build-dir will build all the configurations. But you can build only one configuration by
> cd build-dir/conf
> build

If I understand you correctly then it is a serious issue. The way
build systems, which I am aware of, work is that project authors
define how targets are to be built given certain circumstances, and
then project users decide what the circumstances are. For example
(using b2):

lib a : a.cpp : <link>static:<define>STATIC_BUILD ;

This defines a target which has one source file, and IF the target is
built with static linking, the macro STATIC_BUILD is defined. The
build script does not limit the build to static or dynamic linking.
The user can choose to build a static library, a dynamic library, or
both. It doesn't require the user to change the build script. Same for
debug or release builds, or using different compilers. The user can
even define more macros or set specific compiler and linker flags.
None of that requires changing the build script. At most the user
would edit a special configuration file.

So, do I understand you correctly that this is not how hmake works,
and one would have to change the build script for any variation of
build circumstances? I.e. if I want to add a static build to a
library, enable a sanitizer, use a different compiler, add a specific
compiler flag, define a macro, disable exceptions, change strictness
of warnings --- any of that would require a change to the build
script.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk