Added build support for Sun C++

git-svn-id: http://pugixml.googlecode.com/svn/trunk@453 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
arseny.kapoulkine 2010-05-25 21:50:46 +00:00
parent cd9bc5fa83
commit 77c9a23bfb
3 changed files with 43 additions and 2 deletions

View File

@ -13,7 +13,11 @@
# default toolset/configuration # default toolset/configuration
if ( ! $(toolset) ) if ( ! $(toolset) )
{ {
if ( $(UNIX) ) if ( $(OS) = SOLARIS )
{
toolset = suncc ;
}
else if ( $(UNIX) )
{ {
local GCCVERSION = [ Subst [ Shell "gcc -dumpversion" ] : $(NEWLINE) ] ; local GCCVERSION = [ Subst [ Shell "gcc -dumpversion" ] : $(NEWLINE) ] ;
toolset = "gcc"$(GCCVERSION) ; toolset = "gcc"$(GCCVERSION) ;

View File

@ -285,6 +285,43 @@ else if ( $(toolset:I=^bcc) )
{ {
} }
} }
else if ( $(toolset:I=^suncc) )
{
CCFLAGS += -D$(defines) ;
if ( $(configuration) = "debug" )
{
CCFLAGS += -D_DEBUG ;
}
else
{
CCFLAGS += -DNDEBUG -O ;
}
if ( PUGIXML_NO_EXCEPTIONS in $(defines) )
{
CCFLAGS += -noex ;
}
actions ObjectAction
{
sunCC $(CCFLAGS) +w -xwe -c -o $(<) $(>)
}
actions LibraryAction
{
ar rcs $(<) $(>)
}
actions LinkAction
{
sunCC $(>) -o $(<) $(LDFLAGS)
}
actions CoverageAction
{
}
}
else else
{ {
exit "Unknown toolset $(toolset)!" ; exit "Unknown toolset $(toolset)!" ;

View File

@ -24,7 +24,7 @@ sub gcctoolset
} }
$fast = (shift eq 'fast'); $fast = (shift eq 'fast');
@toolsets = ($^O =~ /MSWin/) ? (bcc, cw, dmc, ic8, mingw34, mingw44, mingw45, msvc6, msvc7, msvc71, msvc8, msvc8_x64, msvc9, msvc9_x64, msvc10, msvc10_x64) : (&gcctoolset()); @toolsets = ($^O =~ /MSWin/) ? (bcc, cw, dmc, ic8, mingw34, mingw44, mingw45, msvc6, msvc7, msvc71, msvc8, msvc8_x64, msvc9, msvc9_x64, msvc10, msvc10_x64) : ($^O =~ /solaris/) ? (suncc) : (&gcctoolset());
@configurations = (debug, release); @configurations = (debug, release);
@defines = (PUGIXML_NO_XPATH, PUGIXML_NO_EXCEPTIONS, PUGIXML_NO_STL, PUGIXML_WCHAR_MODE); @defines = (PUGIXML_NO_XPATH, PUGIXML_NO_EXCEPTIONS, PUGIXML_NO_STL, PUGIXML_WCHAR_MODE);