Files
serialization/build/Jamfile.v2
2024-07-26 17:46:20 -05:00

145 lines
3.7 KiB
Plaintext

# Boost serialization Library Build Jamfile
# (C) Copyright Robert Ramey 2002-2004.
# Use, modification, and distribution are subject to the
# Boost Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# See http://www.boost.org/libs/serialization for the library home page.
require-b2 5.0.1 ;
import-search /boost/config/checks ;
import config : requires ;
constant boost_dependencies_private :
/boost/function//boost_function
;
project
: source-location ../src
: common-requirements <library>$(boost_dependencies)
: requirements
<conditional>@include-spirit
<library>$(boost_dependencies_private)
: usage-requirements
<define>BOOST_SERIALIZATION_NO_LIB=1
;
SPIRIT_ROOT = [ modules.peek : SPIRIT_ROOT ] ;
rule include-spirit ( properties * )
{
local old-compiler ;
if <toolset>borland in $(properties)
{
if ! <toolset-borland:version>6.1.0 in $(properties)
{
old-compiler = true ;
}
}
else if <toolset>msvc in $(properties)
{
if <toolset-msvc:version>6.5 in $(properties)
|| <toolset-msvc:version>7.0 in $(properties)
{
old-compiler = true ;
}
}
local result ;
if $(old-compiler)
{
if $(SPIRIT_ROOT)
{
# note - we can't use <include>$(SPIRIT_ROOT) because
# it puts -I$(SPIRIT_ROOT) AFTER the "../../.." in the command line.
# so use these instead
result = <cxxflags>-I$(SPIRIT_ROOT) ;
}
else
{
echo **** spirit 1.6x required to build library with this compiler **** ;
result = <build>no ;
}
}
return $(result) ;
}
SOURCES =
archive_exception
basic_archive
basic_iarchive
basic_iserializer
basic_oarchive
basic_oserializer
basic_pointer_iserializer
basic_pointer_oserializer
basic_serializer_map
basic_text_iprimitive
basic_text_oprimitive
basic_xml_archive
binary_iarchive
binary_oarchive
extended_type_info
extended_type_info_typeid
extended_type_info_no_rtti
polymorphic_iarchive
polymorphic_oarchive
stl_port
text_iarchive
text_oarchive
polymorphic_text_iarchive
polymorphic_text_oarchive
polymorphic_binary_iarchive
polymorphic_binary_oarchive
polymorphic_xml_iarchive
polymorphic_xml_oarchive
void_cast
xml_grammar
xml_iarchive
xml_archive_exception
codecvt_null
;
SOURCES_HAS_STD_WSTREAMBUF =
xml_oarchive
utf8_codecvt_facet
;
WSOURCES =
basic_text_wiprimitive
basic_text_woprimitive
text_wiarchive
text_woarchive
polymorphic_text_wiarchive
polymorphic_text_woarchive
xml_wgrammar
xml_wiarchive
xml_woarchive
polymorphic_xml_wiarchive
polymorphic_xml_woarchive
codecvt_null
;
lib boost_serialization
: ## sources ##
$(SOURCES).cpp
: ## requirements ##
[ check-target-builds /boost/config/checks//std_wstreambuf : <source>../src/$(SOURCES_HAS_STD_WSTREAMBUF).cpp ]
<toolset>msvc:<cxxflags>/Gy
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
<link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
;
lib boost_wserialization
: $(WSOURCES).cpp boost_serialization
:
[ requires std_wstreambuf ]
<toolset>msvc:<cxxflags>/Gy
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
# note: both serialization and wserialization are conditioned on the this
# switch - don't change it to BOOST_WSERIALIZATION_DYN_LINK
<link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
;