[Boost-users] bjam command line syntax

25 views
Skip to first unread message

Johan Råde

unread,
Jul 2, 2008, 10:56:36 AM7/2/08
to boost...@lists.boost.org
What is the bjam command line syntax for disabling "Secure SCL" when I build boost with MSVC 9.0?
Is it

bjam --toolset=msvc-9.0 --cxxflags="-D_SECURE_SCL=0"

--Johan

_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Steven Watanabe

unread,
Jul 2, 2008, 11:42:57 AM7/2/08
to boost...@lists.boost.org
AMDG

Johan Råde wrote:
> What is the bjam command line syntax for disabling "Secure SCL" when I
> build boost with MSVC 9.0?
> Is it
>
> bjam --toolset=msvc-9.0 --cxxflags="-D_SECURE_SCL=0"

You shouldn't use "--" for features, and you can use the
define feature.

bjam toolset=msvc-9.0 define=_SECURE_SCL=0

In Christ,
Steven Watanabe

Johan Råde

unread,
Jul 2, 2008, 12:19:43 PM7/2/08
to boost...@lists.boost.org
Steven Watanabe wrote:
> AMDG
>
> Johan Råde wrote:
>> What is the bjam command line syntax for disabling "Secure SCL" when I
>> build boost with MSVC 9.0?
>> Is it
>>
>> bjam --toolset=msvc-9.0 --cxxflags="-D_SECURE_SCL=0"
>
> You shouldn't use "--" for features, and you can use the
> define feature.
>
> bjam toolset=msvc-9.0 define=_SECURE_SCL=0
>
> In Christ,
> Steven Watanabe


I need to build two versions:

1. debug, dynamic linking, secure SCL
2. release, static linking, no secure SCL

Both versions should use the dynamic runtime and multi-threading.
And I need zlib support with my iostreams.

Is the following correct

bjam toolset=msvc-9.0 runtime-link=dynamic threading=multi debug/link=dynamic/define=_SECURE_SCL=1
release/link=static/define=_SECURE_SCL=0 --NO_ZLIB=0 -sZLIB_SOURCE=C:\ZLib install

--Johan

Steven Watanabe

unread,
Jul 2, 2008, 12:34:37 PM7/2/08
to boost...@lists.boost.org
AMDG

Johan Råde wrote:
> I need to build two versions:
>
> 1. debug, dynamic linking, secure SCL
> 2. release, static linking, no secure SCL
>
> Both versions should use the dynamic runtime and multi-threading.
> And I need zlib support with my iostreams.
>
> Is the following correct
>
> bjam toolset=msvc-9.0 runtime-link=dynamic threading=multi
> debug/link=dynamic/define=_SECURE_SCL=1
> release/link=static/define=_SECURE_SCL=0 --NO_ZLIB=0
> -sZLIB_SOURCE=C:\ZLib install

Almost, try runtime-link=shared and link=shared.

The -n option of bjam is helpful. (Don't actually execute the
updating actions, only print them). You can use --with-iostreams
e.g. to only see the actions for a single library.

In Christ,
Steven Watanabe

Johan Råde

unread,
Jul 2, 2008, 12:37:46 PM7/2/08
to boost...@lists.boost.org
Steven Watanabe wrote:
> AMDG

>
> The -n option of bjam is helpful. (Don't actually execute the
> updating actions, only print them). You can use --with-iostreams
> e.g. to only see the actions for a single library.
>
> In Christ,
> Steven Watanabe

Thanks a lot.

--Johan

Johan Råde

unread,
Jul 9, 2008, 10:33:10 AM7/9/08
to boost...@lists.boost.org
Steven Watanabe wrote:

>
> bjam toolset=msvc-9.0 define=_SECURE_SCL=0
>

The "define=..." syntax does not seem to be documented in the Boost.Build V2 User Manual.

What is the syntax for making several preprocessor definitions,
for instance both _SECURE_SCL=0 and _HAS_ITERATOR_DEBUGGING=0 ?

--Johan

Steven Watanabe

unread,
Jul 9, 2008, 12:13:07 PM7/9/08
to boost...@lists.boost.org
AMDG

Johan Råde wrote:
> The "define=..." syntax does not seem to be documented in the
> Boost.Build V2 User Manual.
>
> What is the syntax for making several preprocessor definitions,
> for instance both _SECURE_SCL=0 and _HAS_ITERATOR_DEBUGGING=0 ?

Just list them all,
define=_SECURE_SCL=0 define=_HAS_ITERATOR_DEBUGGING=0

In Christ,
Steven Watanabe

Reply all
Reply to author
Forward
0 new messages