Added support for different compilation modes
git-svn-id: http://pugixml.googlecode.com/svn/trunk@193 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
15a69d3510
commit
6210c21984
12
Jamfile.jam
12
Jamfile.jam
@ -21,8 +21,18 @@ if ( ! $(configuration) )
|
||||
configuration = "debug" ;
|
||||
}
|
||||
|
||||
# remove empty define
|
||||
defines -= "" ;
|
||||
|
||||
# options
|
||||
BUILD = build/$(toolset)/$(configuration) ;
|
||||
if ( $(defines) )
|
||||
{
|
||||
BUILD = build/$(toolset)/$(defines:J=-)/$(configuration) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
BUILD = build/$(toolset)/standard/$(configuration) ;
|
||||
}
|
||||
|
||||
if ( $(toolset) = "mingw" )
|
||||
{
|
||||
|
||||
34
Jamrules.jam
34
Jamrules.jam
@ -2,6 +2,8 @@
|
||||
|
||||
if ( $(toolset:I=^mingw) )
|
||||
{
|
||||
CCFLAGS += -D$(defines) ;
|
||||
|
||||
if ( $(configuration) = "debug" )
|
||||
{
|
||||
CCFLAGS += -D_DEBUG ;
|
||||
@ -11,6 +13,11 @@ if ( $(toolset:I=^mingw) )
|
||||
CCFLAGS += -DNDEBUG -O3 ;
|
||||
}
|
||||
|
||||
if ( PUGIXML_NO_EXCEPTIONS in $(defines) )
|
||||
{
|
||||
CCFLAGS += -fno-exceptions ;
|
||||
}
|
||||
|
||||
actions ObjectAction
|
||||
{
|
||||
"%$(toolset)_PATH%\bin\gcc" -W -Wall -Wextra -Werror -pedantic -c $(>) -o $(<) $(CCFLAGS)
|
||||
@ -33,6 +40,8 @@ if ( $(toolset:I=^mingw) )
|
||||
}
|
||||
else if ( $(toolset:I=^msvc) )
|
||||
{
|
||||
CCFLAGS += /D$(defines) ;
|
||||
|
||||
if ( $(configuration) = "debug" )
|
||||
{
|
||||
CCFLAGS += /D_DEBUG /MTd ;
|
||||
@ -51,9 +60,14 @@ else if ( $(toolset:I=^msvc) )
|
||||
CCFLAGS += /W3 ; # lots of warnings at W4 in standard library
|
||||
}
|
||||
|
||||
if ( ! ( PUGIXML_NO_EXCEPTIONS in $(defines) ) )
|
||||
{
|
||||
CCFLAGS += /EHsc ;
|
||||
}
|
||||
|
||||
actions ObjectAction
|
||||
{
|
||||
"%$(toolset)_PATH%\bin\cl.exe" /EHsc /WX /I"%$(toolset)_PATH%\include" /c $(>) /Fo$(<) /nologo $(CCFLAGS)
|
||||
"%$(toolset)_PATH%\bin\cl.exe" /WX /I"%$(toolset)_PATH%\include" /c $(>) /Fo$(<) /nologo $(CCFLAGS)
|
||||
}
|
||||
|
||||
actions LibraryAction
|
||||
@ -74,6 +88,8 @@ else if ( $(toolset) = "ic8" )
|
||||
{
|
||||
msvc = "msvc7" ;
|
||||
|
||||
CCFLAGS += /D$(defines) ;
|
||||
|
||||
if ( $(configuration) = "debug" )
|
||||
{
|
||||
CCFLAGS += /D_DEBUG /MTd ;
|
||||
@ -83,9 +99,14 @@ else if ( $(toolset) = "ic8" )
|
||||
CCFLAGS += /DNDEBUG /Ox /MT ;
|
||||
}
|
||||
|
||||
if ( ! ( PUGIXML_NO_EXCEPTIONS in $(defines) ) )
|
||||
{
|
||||
CCFLAGS += /EHsc ;
|
||||
}
|
||||
|
||||
actions ObjectAction
|
||||
{
|
||||
"%$(toolset)_PATH%\bin\icl.exe" /EHsc /W4 /WX /Wport /Qwd981,444,280,383,909,304,167 /I"%$(msvc)_PATH%\include" /I"%$(toolset)_PATH%\include" /c $(>) /Fo$(<) /nologo $(CCFLAGS)
|
||||
"%$(toolset)_PATH%\bin\icl.exe" /W4 /WX /Wport /Qwd981,444,280,383,909,304,167 /I"%$(msvc)_PATH%\include" /I"%$(toolset)_PATH%\include" /c $(>) /Fo$(<) /nologo $(CCFLAGS)
|
||||
}
|
||||
|
||||
actions LibraryAction
|
||||
@ -104,6 +125,8 @@ else if ( $(toolset) = "ic8" )
|
||||
}
|
||||
else if ( $(toolset:I=^dmc) )
|
||||
{
|
||||
CCFLAGS += -D$(defines) ;
|
||||
|
||||
if ( $(configuration) = "debug" )
|
||||
{
|
||||
CCFLAGS += -D_DEBUG ;
|
||||
@ -113,9 +136,14 @@ else if ( $(toolset:I=^dmc) )
|
||||
CCFLAGS += -DNDEBUG ;
|
||||
}
|
||||
|
||||
if ( !(PUGIXML_NO_EXCEPTIONS in $(defines)) )
|
||||
{
|
||||
CCFLAGS += -Ae ;
|
||||
}
|
||||
|
||||
actions ObjectAction
|
||||
{
|
||||
"%$(toolset)_PATH%\bin\dmc.exe" -c -f -wx -Ae $(>) -o$(<)
|
||||
"%$(toolset)_PATH%\bin\dmc.exe" -c -f -wx $(>) -o$(<)
|
||||
}
|
||||
|
||||
actions LibraryAction
|
||||
|
||||
Loading…
Reference in New Issue
Block a user