Boost logo

Boost :

From: Hassan Sajjad (hassan.sajjad069_at_[hidden])
Date: 2024-03-22 22:24:44


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
hbuild
You can rebuild by first deleting the configuration directory contents and
then running hbuild in that directory. It will not impact other
configurations.

On Fri, Mar 22, 2024 at 10:57 PM Дмитрий Архипов via Boost <
boost_at_[hidden]> wrote:

> пт, 22 мар. 2024 г. в 20:32, Hassan Sajjad <hassan.sajjad069_at_[hidden]>:
> >>
> >> Do I understand correctly, that I would have to change the build
> >> script (since it's a cpp file, is build source file more fitting?) to
> >> build a new configuration?
> >
> > Yes. Do you think it is wrong? Why? How do you envision it?
>
> Consider this b2 project:
>
> # jamroot.jam
> exe main : main.cpp ;
>
> In order to build it in debug and release I would call b2 like this:
>
> b2 variant=debug,release
>
> With a similar CMake project:
>
> #CMakeLists.txt
> cmake_minimum_required(VERSION 3.5)
> project(proj LANGUAGES CXX)
> add_executable(main main.cpp)
>
> Building debug and release (using a single config generator) is done with
> e.g.
> cmake -S. -Bbuild/debug -DCMAKE_BUILD_TYPE=Debug
> cmake --build build/debug
> cmake -S. -Bbuild/release -DCMAKE_BUILD_TYPE=Release
> cmake --build build/release
>
> Neither b2 nor CMake requires any changes to build scripts to build
> different configurations.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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