List Info

Thread: Surprising behavior with toolset conditionals and msvc autodetect




Surprising behavior with toolset conditionals and msvc autodetect
country flaguser name
United States
2007-08-24 15:02:49
I'm using BBv2 from trunk revision 38872.
I have a simple Jamfile setup to run some unit tests that
has:

unit-test my_test
     : ../../source/my_test.cpp
     :
      
<toolset>msvc-8.0:<define>_CRT_SECURE_NO_DEPRECA
TE=1
      
<toolset>msvc-8.0:<define>_SCL_SECURE_NO_DEPRECA
TE=1
     ;

Now if i execute:

bjam my_test

It correctly chooses msvc-8.0 as the default toolset to
compile with but 
doesn't define these macros.

If I change the bjam invocation to

bjam my_test toolset=msvc-8.0

The macros get defined.

If I  change the Jamfile to

unit-test my_test
     : ../../source/my_test.cpp
     :
      
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE=1

      
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE=1

     ;

the macros get defined with either bjam invocation
however this isn't what I really mean.. I want to turn the
macros on for 
only msvc-8.0

Thanks,

Michael Marcin

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: Surprising behavior with toolset conditionals and msvc autodetect
user name
2007-08-25 09:30:05
Michael Marcin wrote:
> I'm using BBv2 from trunk revision 38872.
> I have a simple Jamfile setup to run some unit tests
that has:
>
> unit-test my_test
>      : ../../source/my_test.cpp
>      :
>       
<toolset>msvc-8.0:<define>_CRT_SECURE_NO_DEPRECA
TE=1
>       
<toolset>msvc-8.0:<define>_SCL_SECURE_NO_DEPRECA
TE=1
>      ;
>
> Now if i execute:
>
> bjam my_test
>
> It correctly chooses msvc-8.0 as the default toolset to
compile with but 
> doesn't define these macros.
>
> If I change the bjam invocation to
>
> bjam my_test toolset=msvc-8.0
>
> The macros get defined.
>
> If I  change the Jamfile to
>
> unit-test my_test
>      : ../../source/my_test.cpp
>      :
>       
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE=1

>       
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE=1

>      ;
>
> the macros get defined with either bjam invocation
> however this isn't what I really mean.. I want to turn
the macros on for 
> only msvc-8.0
>
> Thanks,
>
> Michael Marcin

I've had to use "<toolset-msvc:version>8.0" 
A quick search didn't find
why I had to do that, but I'm pretty sure I got the info off
this list.  

HTH,

Phillip
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )