|
Boost Testing : |
From: Stephen W. Carson (StephenC_at_[hidden])
Date: 2005-01-19 14:52:36
OK, I'm cooking with gas now... I think. I'm now running with the following command line:
python regression.py --runner=Dirxion --bjam-toolset=darwin --pjl-toolset=darwin --toolsets=cw-9_3-darwin
This way I'm not relying on CodeWarrior to build either bjam or process_jam_log, (I'm not losing anything by letting gcc build those, right?)
I have attached the .jam file that I'm succeeding with. Should I try to merge my changes in or will Rene or someone else more comfortable with the scripting language do that?
I haven't seen my test results show up yet but a quick glance at bjam.log suggests that there may be more problems to deal with in the CodeWarrior on Mac regression.
The regression tests took half the time with CodeWarrior that they do with gcc. It looks like some libraries are skipped when running CodeWarrior tests. Is CodeWarrior also a lot faster than gcc?
Thanks for all the help so far!
-- Stephen W. Carson, Software Engineer DirXion Software in St. Louis, MO (636) 717-2367 "Premature optimization is the root of all evil." -Donald Knuth
#~ Copyright 2004 Rene Rivera.
#~ Distributed under the Boost Software License, Version 1.0.
#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# The following #// line will be used by the regression test table generation
# program as the column heading for HTML tables. Must not include version number.
#//Metrowerks
CodeWarrior
# singleton variables...
set-as-singleton CW_ROOT CWFOLDER CWFolder ;
flags cw cw-version : $(CW_VERSION) ;
flags cw cw-root : $(CW_ROOT) ;
cw-root ?= $(CWFolder) ;
cw-root ?= $(CWFOLDER) ;
if $(NT)
{
for local v in 9.0 8.0 7.0 6.0
{
cw-root-$(v) ?= [ W32_GETREG "HKEY_LOCAL_MACHINE\\SOFTWARE\\Metrowerks\\CodeWarrior for Windows\\$(v)" : "PATH" ] ;
cw-version ?= [ conditional $(cw-root-$(v)) : $(v) ] ;
}
}
cw-root ?= $(cw-root-$(cw-version)) ;
flags cw CFLAGS <cflags> ;
flags cw C++FLAGS <cxxflags> ;
flags cw DEFINES <define> ;
flags cw UNDEFS <undef> ;
flags cw HDRS <include> ;
flags cw SYSHDRS <sysinclude> ;
flags cw LINKFLAGS <linkflags> ;
flags cw ARFLAGS <arflags> ;
flags cw LIBPATH <library-path> ;
flags cw NEEDLIBS <library-file> ;
flags cw FINDLIBS <find-library> ;
flags cw PREFIX <prefix> ;
flags cw cw-errors <errors> ;
flags cw cw-warnings <warnings> ;
# Debug information
flags cw CFLAGS <debug-symbols>on : -g ;
flags cw LINKFLAGS <debug-symbols>on : -g ;
# Optimizations
flags cw CFLAGS <optimization>off : -O0 ;
flags cw CFLAGS <optimization>speed : -opt full ;
flags cw CFLAGS <optimization>space : -O4,s "-opt intrinsics" ;
flags cw CFLAGS <inlining>off : -inline off ;
flags cw CFLAGS <inlining>on : -inline on ;
flags cw CFLAGS <inlining>full : -inline auto -inline level=8 ;
# Target type
flags cw LINKFLAGS <target-type>$(SHARED_TYPES) : -shared ;
if $(NT)
{
flags cw LINKFLAGS <target-type>$(SHARED_TYPES) : "-export dllexport" ;
}
# Some language related options
flags cw C++FLAGS : -DNOMINMAX ;
flags cw CFLAGS <eh-model>msvc : -exc ms ;
flags cw CFLAGS <include-search>directory : "-cwd proj" ;
flags cw CFLAGS <include-search>source : "-cwd source" ;
flags cw CFLAGS <include-search>paths : "-cwd explicit" ;
flags cw CFLAGS <include-search>relative : "-cwd include" ;
flags cw C++FLAGS <rtti>off : "-RTTI off" ;
flags cw C++FLAGS <rtti>on : "-RTTI on" ;
# OS subsystem target
if $(NT)
{
flags cw LINKFLAGS <user-interface>console : "-subsystem console" ;
flags cw LINKFLAGS <user-interface>gui : "-subsystem windows" ;
flags cw LINKFLAGS <user-interface>wince : "-subsystem wince" ;
flags cw LINKFLAGS <user-interface>native : "-subsystem native" ;
flags cw LINKFLAGS <user-interface>auto : "-subsystem auto" ;
}
# Errors, default to maximum 5 errors
flags cw FLAGS : [ conditional $(cw-errors) : "-maxerrors $(cw-errors[1])" : "-maxerrors 5" ] ;
# Warnings, default to maximum 20 warnings
if off in $(cw-warnings)
{
flags cw FLAGS : "-warnings off" ;
}
else if error in $(cw-warnings)
{
flags cw FLAGS : "-warnings error" ;
}
else
{
flags cw FLAGS : "-warnings on" ;
}
if ! ( off in $(cw-warnings) )
{
if [ MATCH "^([0-9]+)" : $(cw-warnings) ]
{
local cw-maxwarnings = [ MATCH "^([0-9]+)" : $(cw-warnings) ] ;
cw-warnings = [ difference $(cw-warnings) : $(cw-maxwarnings) ] ;
flags cw FLAGS : "-maxwarnings $(cw-maxwarnings[1])" ;
}
else
{
flags cw FLAGS : "-maxwarnings 20" ;
}
}
cw-warnings = [ difference $(cw-warnings) : on off error ] ;
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" ;
}
# Search for files in search paths
flags cw LINKFLAGS : -search ;
flags cw ARFLAGS : -search ;
# Version specific options
if $(cw-version) in 8.0 9.0
{
# Use latest ISO conforming templates
flags cw C++FLAGS : -iso_templates on ;
if $(NT)
{
# 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 ;
}
}
if $(NT) && $(cw-version) in 6.0 7.0 8.0
{
flags cw PREFIX <user-interface>console/<runtime-link>dynamic : UseDLLPrefix.h ;
}
if $(NT) && $(cw-version) in 7.0
{
# The runtime libraries
flags cw STDLIBS <runtime-link>static/<runtime-build>release :
MSL_C_x86.lib MSL_Runtime_x86.lib msl_c++_x86.lib gdi32.lib user32.lib kernel32.lib ;
flags cw STDLIBS <runtime-link>dynamic/<runtime-build>release :
MSL_All-DLL_x86.lib gdi32.lib user32.lib kernel32.lib ;
flags cw STDLIBS <runtime-link>static/<runtime-build>debug :
MSL_C_x86_D.lib MSL_Runtime_x86_D.lib msl_c++_x86_D.lib gdi32.lib user32.lib kernel32.lib ;
flags cw STDLIBS <runtime-link>dynamic/<runtime-build>debug :
MSL_All-DLL_x86_D.lib gdi32.lib user32.lib kernel32.lib ;
}
if $(NT) && $(cw-version) in 6.0
{
# The runtime libraries
flags cw STDLIBS <runtime-link>static :
ansicx86.lib mwcrtl.lib ansicppx86.lib gdi32.lib user32.lib kernel32.lib ;
flags cw STDLIBS <runtime-link>dynamic :
mwcrtldll.lib gdi32.lib user32.lib kernel32.lib ;
}
# The paths to system and runtime libraries
if $(NT)
{
flags cw CW_SETUP : "call \"$(cw-root)\\Other Metrowerks Tools\\Command Line Tools\\cwenv.bat\" -quiet" ;
# This is needed after the setup because the CW-9 setup erronously sets the
# ERRORLEVEL pseudo-var directly overriding the real value. The aregument is
# quoted to prevent the value from getting set to " " because bjam insertes
# extra spaces at the end of action commands.
flags cw CW_CLEAR_ERROR : "set \"ERRORLEVEL=\"" ;
flags cw CW_LINK_SETUP : "set MWWinx86LibraryFiles=" ;
flags cw CW_IMPLIB_COMMAND : "-implib " ;
flags cw CW_RUN_PATH :
"$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime"
"$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs\\MSL_All-DLLs" ;
flags cw STDLIBPATH : "$(cw-root)\\Win32-x86 Support\\Libraries\\Win32 SDK" ;
flags cw STDLIBPATH <runtime-link>static : "$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs" ;
flags cw STDLIBPATH <runtime-link>dynamic : "$(cw-root)\\Win32-x86 Support\\Libraries\\Runtime\\Libs\\MSL_All-DLLs" ;
}
# Don't wrap tool messages, they just confuse everyone :-)
flags cw FLAGS : -nowraplines ;
flags cw CW_PREFIX : "-prefix " ;
#### Link ####
rule Link-action
{
# We can't have the mixture of the same libs going in NEEDLIBS and FINDLIBS.
# So remove the extras from FINDLIBS.
FINDLIBS on $(<) =
[ difference
[ on $(<[1]) return $(FINDLIBS) ] :
$(gTARGET_BASENAME($(gTARGET_SUBVARIANT($(NEEDLIBS))))) ] ;
gRUN_PATH($(<)) += $(CW_RUN_PATH) ;
with-command-file cw-Link-action $(<) : $(>) $(NEEDLIBS) ;
}
actions cw-Link-action
{
$(CW_SETUP)
$(CW_CLEAR_ERROR)
$(CW_LINK_SETUP)$(STDLIBS:J=;)
mwld $(FLAGS) $(LINKFLAGS) "-L$(LIBPATH)" "-L$(STDLIBPATH)" $(CW_IMPLIB_COMMAND)"$(<[2])" -o "$(<[1])" @"$(>)" "$(FINDLIBS)$(SUFLIB)"
}
#### Cc #####
rule Cc-action
{
cw-Cc-action $(<) : $(>) ;
}
actions cw-Cc-action
{
$(CW_SETUP)
$(CW_CLEAR_ERROR)
mwcc -c -lang c -U$(UNDEFS) -D$(DEFINES) $(FLAGS) $(CFLAGS) "-I$(HDRS)" -I- "-I$(STDHDRS)" "-I$(SYSHDRS)" $(CW_PREFIX)"$(PREFIX)" -o "$(<)" "$(>)"
}
#### C++ ####
rule C++-action
{
cw-C++-action $(<) : $(>) ;
}
actions cw-C++-action
{
$(CW_SETUP)
$(CW_CLEAR_ERROR)
# mwcc -c -lang c++ -U$(UNDEFS) -D$(DEFINES) $(FLAGS) $(CFLAGS) $(C++FLAGS) "-I$(HDRS)" -I- "-I$(STDHDRS)" "-I$(SYSHDRS)" $(CW_PREFIX)"$(PREFIX)" -o "$(<)" "$(>)"
mwcc -c -lang c++ -U$(UNDEFS) -D$(DEFINES) $(FLAGS) $(CFLAGS) $(C++FLAGS) "-I$(HDRS)" -I- "-I$(SYSHDRS)" $(CW_PREFIX)"$(PREFIX)" -o "$(<)" "$(>)"
}
#### Archive ####
rule Archive-action
{
with-command-file cw-Archive-action $(<) : $(>) [ on $(<) return $(NEEDLIBS) ] ;
}
actions together cw-Archive-action
{
$(CW_SETUP)
$(CW_CLEAR_ERROR)
mwld -library $(FLAGS) $(ARFLAGS) "-L$(LIBPATH)" "-L$(STDLIBPATH)" -o "$(<)" @"$(>)" "$(FINDLIBS)$(SUFLIB)"
}