summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-10-29 07:18:26 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-10-29 07:18:26 +0000
commit6210c21984e9319b04ba84cc9937e92519770295 (patch)
tree8e7785005f5af6a7f965ff3aafff9442e863acd6
parent15a69d3510b5a53fcdf793785deca3af1f0adc4f (diff)
Added support for different compilation modes
git-svn-id: http://pugixml.googlecode.com/svn/trunk@193 99668b35-9821-0410-8761-19e4c4f06640
-rw-r--r--Jamfile.jam12
-rw-r--r--Jamrules.jam34
2 files changed, 42 insertions, 4 deletions
diff --git a/Jamfile.jam b/Jamfile.jam
index 48dd03a..6908c9f 100644
--- a/Jamfile.jam
+++ b/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" )
{
diff --git a/Jamrules.jam b/Jamrules.jam
index c74764f..fccb75c 100644
--- a/Jamrules.jam
+++ b/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