|
Boost Testing : |
From: Stephen W. Carson (StephenC_at_[hidden])
Date: 2005-01-10 09:59:01
Rene Rivera wrote:
> Stephen Carson wrote:
>
>> I'm going to try "-warnings", looks like that will work for both PC &
>> Mac. Though the PC seems to have a few warning options that are not
>> on the Mac, the ones that both do support use the same keywords. I'm
>> not sure what to do about the ones that are on the PC but not on the
>> Mac in the .jam script, (should i just remove the lines that contain
>> them for now?).
>
>
> Either comment them out, so that we can tell which ones they are. Or
> wrap them with:
>
> if $(NT)
> {
> ...
> }
>
Alright, here is my warnings section now:
if $(cw-warnings)
{
flags cw CFLAGS <warnings>no-illegal-pragmas : "-warnings nopragmas" ;
flags cw CFLAGS <warnings>illegal-pragmas : "-warnings pragmas" ;
flags cw CFLAGS <warnings>no-empty-declarations : "-warnings noempty" ;
flags cw CFLAGS <warnings>empty-declarations : "-warnings empty" ;
flags cw CFLAGS <warnings>no-empty-declarations : "-warnings noempty" ;
flags cw CFLAGS <warnings>empty-declarations : "-warnings empty" ;
flags cw CFLAGS <warnings>no-unwanted-effect : "-warnings nounwanted" ;
flags cw CFLAGS <warnings>unwanted-effect : "-warnings unwanted" ;
flags cw CFLAGS <warnings>no-unused-arg : "-warnings nounusedarg" ;
flags cw CFLAGS <warnings>unused-arg : "-warnings unsedarg" ;
flags cw CFLAGS <warnings>no-unused-var : "-warnings nounusedvar" ;
flags cw CFLAGS <warnings>unused-var : "-warnings unsedvar" ;
# flags cw CFLAGS <warnings>no-unused-expresssion : "-warnings
nounusedexpr" ;
# flags cw CFLAGS <warnings>unused-expresssion : "-warnings unsedexpr" ;
flags cw CFLAGS <warnings>no-extra-comma : "-warnings nocomma" ;
flags cw CFLAGS <warnings>extra-comma : "-warnings comma" ;
flags cw CFLAGS <warnings>no-pedantic : "-warnings nopedantic" ;
flags cw CFLAGS <warnings>pedantic : "-warnings pedantic" ;
flags cw CFLAGS <warnings>no-hidden-virtual : "-warnings nohidden" ;
flags cw CFLAGS <warnings>hidden-virtual : "-warnings hidden" ;
flags cw CFLAGS <warnings>no-implicit-convert : "-warnings
noimplicit" ;
flags cw CFLAGS <warnings>implicit-convert : "-warnings implicit" ;
flags cw CFLAGS <warnings>no-not-inlined : "-warnings nonotinlined" ;
flags cw CFLAGS <warnings>not-inlined : "-warnings notinlined" ;
flags cw CFLAGS <warnings>no-inconsistent-class : "-warnings
nostructclass" ;
flags cw CFLAGS <warnings>inconsistent-class : "-warnings
structclass" ;
# flags cw CFLAGS <warnings>no-structure-pad : "-warnings nopadding" ;
# flags cw CFLAGS <warnings>structure-pad : "-warnings padding" ;
# flags cw CFLAGS <warnings>no-unused-return : "-warnings nonotused" ;
# flags cw CFLAGS <warnings>unused-return : "-warnings notused" ;
# flags cw CFLAGS <warnings>no-pointer-conversion : "-warnings
noptrintconv" ;
# flags cw CFLAGS <warnings>pointer-conversion : "-warnings
ptrintconv" ;
}
else
{
# flags cw CFLAGS : "-warnings nounusedexpr,nounused" ;
flags cw CFLAGS : "-warnings nounused" ;
}
>> Alright, no more warning problems, now it is:
>> Error : Unknown option 'runtime'
>
> It looks like there is only one MSL runtime, and hence no options to
> select it. So those options should be wrapped with "if $(NT)"
Alright, here is that section now:
if $(NT) && $(cw-version) in 8.0 9.0
{
# Use latest ISO conforming templates
flags cw C++FLAGS : -iso_templates on ;
# The runtime libraries
flags cw CFLAGS
<runtime-link>static/<threading>single/<runtime-build>release : -runtime
ss ;
flags cw CFLAGS
<runtime-link>static/<threading>single/<runtime-build>debug : -runtime
ssd ;
flags cw CFLAGS
<runtime-link>static/<threading>multi/<runtime-build>release : -runtime
sm ;
flags cw CFLAGS
<runtime-link>static/<threading>multi/<runtime-build>debug : -runtime smd ;
flags cw CFLAGS <runtime-link>dynamic/<runtime-build>release :
-runtime dm ;
flags cw CFLAGS <runtime-link>dynamic/<runtime-build>debug :
-runtime dmd ;
}
>
> I also see that "-shared" option is not present. This is what is used
> on Windows to indicate one is building a DLL. But I don't see any
> equivalent, so you'll have to figure this one out. There must be
> something in the CW docs on how to create shared libraries (or
> frameworks).
I'll look into this.
Here is where I'm stuck now, any thoughts?:
cw-C++-action
../../../bin/boost/libs/filesystem/build/libboost_filesystem.a/cw-9_3-
darwin/release/exception.o
Error : macro 'RAND_MAX' redefined
(included from:
/usr/include/assert.h:14
/Users/stephencarson/Development/boost/boost/boost/assert.hpp:35
/Users/stephencarson/Development/boost/boost/boost/shared_ptr.hpp:23
/Users/stephencarson/Development/boost/boost/boost/filesystem/
exception.hpp:22
/Users/stephencarson/Development/boost/boost/libs/filesystem/src/
exception.cpp:18)
/usr/include/stdlib.h line 117 #define RAND_MAX 0x7fffffff
Error : (location of previous definition)
/Applications/Metrowerks CodeWarrior 9.0/Metrowerks
CodeWarrior/MSL/MSL_C/MSL_Common/Include/cstdlib line 44 #define
RAND_MAX 32767
Error : macro 'MB_CUR_MAX' redefined
(included from:
/usr/include/assert.h:14
/Users/stephencarson/Development/boost/boost/boost/assert.hpp:35
/Users/stephencarson/Development/boost/boost/boost/shared_ptr.hpp:23
/Users/stephencarson/Development/boost/boost/boost/filesystem/
exception.hpp:22
/Users/stephencarson/Development/boost/boost/libs/filesystem/src/
exception.cpp:18)
/usr/include/stdlib.h line 120 #define MB_CUR_MAX __mb_cur_max
Error : (location of previous definition)
/Applications/Metrowerks CodeWarrior 9.0/Metrowerks
CodeWarrior/MSL/MSL_C/MSL_Common/Include/cstdlib line 45 #define
MB_CUR_MAX _MSL_MB_CUR_MAX
Error : illegal function overloading
(included from:
/usr/include/assert.h:14
/Users/stephencarson/Development/boost/boost/boost/assert.hpp:35
/Users/stephencarson/Development/boost/boost/boost/shared_ptr.hpp:23
/Users/stephencarson/Development/boost/boost/boost/filesystem/
exception.hpp:22
/Users/stephencarson/Development/boost/boost/libs/filesystem/src/
exception.cpp:18)
/usr/include/stdlib.h line 183 char *cgetcap(char *, const char *, int);
Status : Too many errors printed, aborting program
-- Stephen W. Carson, Software Engineer DirXion Software in St. Louis, MO (636) 717-2367 "Premature optimization is the root of all evil." -Donald Knuth