diff options
Diffstat (limited to '3rdParty/Boost')
-rw-r--r-- | 3rdParty/Boost/SConscript | 290 |
1 files changed, 145 insertions, 145 deletions
diff --git a/3rdParty/Boost/SConscript b/3rdParty/Boost/SConscript index 6d04c0d..8708eb9 100644 --- a/3rdParty/Boost/SConscript +++ b/3rdParty/Boost/SConscript @@ -4,16 +4,16 @@ Import("env") # FIXME: Remove this when Boost UUID is present on most distros if env.get("BOOST_BUNDLED_UUID_ONLY", False) : - # Cherry pick UUID out of the 3rdParty dir, install it in a separate - # dir, and use this as an include path. - if env["SCONS_STAGE"] == "flags" : - if env["PLATFORM"] == "win32" : - uuid_cppflags = ["/I" + Dir("uuid").abspath] - else : - uuid_cppflags = [("-isystem", Dir("uuid").abspath)] - env["BOOST_FLAGS"]["CPPFLAGS"] = env["BOOST_FLAGS"].get("CPPFLAGS", []) + uuid_cppflags - elif env["SCONS_STAGE"] == "build" : - env.Install("uuid/boost", "src/boost/uuid") + # Cherry pick UUID out of the 3rdParty dir, install it in a separate + # dir, and use this as an include path. + if env["SCONS_STAGE"] == "flags" : + if env["PLATFORM"] == "win32" : + uuid_cppflags = ["/I" + Dir("uuid").abspath] + else : + uuid_cppflags = [("-isystem", Dir("uuid").abspath)] + env["BOOST_FLAGS"]["CPPFLAGS"] = env["BOOST_FLAGS"].get("CPPFLAGS", []) + uuid_cppflags + elif env["SCONS_STAGE"] == "build" : + env.Install("uuid/boost", "src/boost/uuid") elif env.get("BOOST_BUNDLED", False) : @@ -21,153 +21,153 @@ elif env.get("BOOST_BUNDLED", False) : # Common ################################################################################ - cppdefines = ["BOOST_ALL_NO_LIB", "BOOST_SYSTEM_NO_DEPRECATED"] - #if env["PLATFORM"] == "darwin" : - # cppdefines += ["BOOST_ASIO_DISABLE_KQUEUE"] - if env["PLATFORM"] == "win32" : - cppflags = ["/I" + Dir("#/3rdParty/Boost/src").abspath] - else : - cppflags = [("-isystem", Dir("#/3rdParty/Boost/src").abspath)] + cppdefines = ["BOOST_ALL_NO_LIB", "BOOST_SYSTEM_NO_DEPRECATED"] + #if env["PLATFORM"] == "darwin" : + # cppdefines += ["BOOST_ASIO_DISABLE_KQUEUE"] + if env["PLATFORM"] == "win32" : + cppflags = ["/I" + Dir("#/3rdParty/Boost/src").abspath] + else : + cppflags = [("-isystem", Dir("#/3rdParty/Boost/src").abspath)] ################################################################################ # Flags ################################################################################ - if env["SCONS_STAGE"] == "flags" : - env["BOOST_FLAGS"] = { - "CPPFLAGS": cppflags, - "CPPDEFINES": cppdefines, - "LIBPATH": [Dir(".")], - "LIBS": ["Swiften_Boost"] - } - if env["PLATFORM"] == "win32" : - # 0x0600 = _WIN32_WINNT_VISTA - env["BOOST_FLAGS"]["CPPDEFINES"] += [("_WIN32_WINNT", "0x0600")] - if env["PLATFORM"] == "cygwin" : - env["BOOST_FLAGS"]["CPPDEFINES"] += ["__USE_W32_SOCKETS"] - elif env["PLATFORM"] == "posix" : - env["BOOST_FLAGS"]["LIBS"] += ["rt"] + if env["SCONS_STAGE"] == "flags" : + env["BOOST_FLAGS"] = { + "CPPFLAGS": cppflags, + "CPPDEFINES": cppdefines, + "LIBPATH": [Dir(".")], + "LIBS": ["Swiften_Boost"] + } + if env["PLATFORM"] == "win32" : + # 0x0600 = _WIN32_WINNT_VISTA + env["BOOST_FLAGS"]["CPPDEFINES"] += [("_WIN32_WINNT", "0x0600")] + if env["PLATFORM"] == "cygwin" : + env["BOOST_FLAGS"]["CPPDEFINES"] += ["__USE_W32_SOCKETS"] + elif env["PLATFORM"] == "posix" : + env["BOOST_FLAGS"]["LIBS"] += ["rt"] ################################################################################ # Build ################################################################################ - if env["SCONS_STAGE"] == "build" : - myenv = env.Clone() - myenv.Replace(CXXFLAGS = [flag for flag in env["CXXFLAGS"] if not flag.startswith("-W")]) - if os.path.basename(env["CXX"]) in ["clang", "clang++"] : - myenv.Append(CXXFLAGS = [ - "-Wno-deprecated-register", # The register keyword will be reserved in C++17, we only use C++11 though. - ]) + if env["SCONS_STAGE"] == "build" : + myenv = env.Clone() + myenv.Replace(CXXFLAGS = [flag for flag in env["CXXFLAGS"] if not flag.startswith("-W")]) + if os.path.basename(env["CXX"]) in ["clang", "clang++"] : + myenv.Append(CXXFLAGS = [ + "-Wno-deprecated-register", # The register keyword will be reserved in C++17, we only use C++11 though. + ]) - sources = [ - "src/libs/atomic/src/lockpool.cpp", - "src/libs/date_time/src/gregorian/date_generators.cpp", - "src/libs/date_time/src/gregorian/greg_month.cpp", - "src/libs/date_time/src/gregorian/greg_weekday.cpp", - "src/libs/date_time/src/gregorian/gregorian_types.cpp", - "src/libs/date_time/src/posix_time/posix_time_types.cpp", - "src/libs/system/src/error_code.cpp", - "src/libs/filesystem/src/codecvt_error_category.cpp", - "src/libs/filesystem/src/operations.cpp", - "src/libs/filesystem/src/path.cpp", - "src/libs/filesystem/src/path_traits.cpp", - "src/libs/filesystem/src/portability.cpp", - "src/libs/filesystem/src/unique_path.cpp", - "src/libs/filesystem/src/windows_file_codecvt.cpp", - "src/libs/filesystem/src/filesystem_utf8_codecvt_facet.cpp", - "src/libs/regex/src/c_regex_traits.cpp", - "src/libs/regex/src/cpp_regex_traits.cpp", - "src/libs/regex/src/cregex.cpp", - "src/libs/regex/src/fileiter.cpp", - "src/libs/regex/src/icu.cpp", - "src/libs/regex/src/instances.cpp", - "src/libs/regex/src/posix_api.cpp", - "src/libs/regex/src/regex.cpp", - "src/libs/regex/src/regex_debug.cpp", - "src/libs/regex/src/regex_raw_buffer.cpp", - "src/libs/regex/src/regex_traits_defaults.cpp", - "src/libs/regex/src/static_mutex.cpp", - "src/libs/regex/src/w32_regex_traits.cpp", - "src/libs/regex/src/wc_regex_traits.cpp", - "src/libs/regex/src/wide_posix_api.cpp", - "src/libs/regex/src/winstances.cpp", - "src/libs/regex/src/usinstances.cpp", - "src/libs/program_options/src/cmdline.cpp", - "src/libs/program_options/src/config_file.cpp", - "src/libs/program_options/src/convert.cpp", - "src/libs/program_options/src/options_description.cpp", - "src/libs/program_options/src/positional_options.cpp", - "src/libs/program_options/src/split.cpp", - "src/libs/program_options/src/program_options_utf8_codecvt_facet.cpp", - "src/libs/program_options/src/value_semantic.cpp", - "src/libs/program_options/src/variables_map.cpp", - "src/libs/program_options/src/winmain.cpp", - "src/libs/serialization/src/archive_exception.cpp", - "src/libs/serialization/src/basic_archive.cpp", - "src/libs/serialization/src/basic_iarchive.cpp", - "src/libs/serialization/src/basic_iserializer.cpp", - "src/libs/serialization/src/basic_oarchive.cpp", - "src/libs/serialization/src/basic_oserializer.cpp", - "src/libs/serialization/src/basic_pointer_iserializer.cpp", - "src/libs/serialization/src/basic_pointer_oserializer.cpp", - "src/libs/serialization/src/basic_serializer_map.cpp", - "src/libs/serialization/src/basic_text_iprimitive.cpp", - "src/libs/serialization/src/basic_text_oprimitive.cpp", - "src/libs/serialization/src/basic_text_wiprimitive.cpp", - "src/libs/serialization/src/basic_text_woprimitive.cpp", - "src/libs/serialization/src/basic_xml_archive.cpp", - "src/libs/serialization/src/binary_iarchive.cpp", - "src/libs/serialization/src/binary_oarchive.cpp", - "src/libs/serialization/src/binary_wiarchive.cpp", - "src/libs/serialization/src/binary_woarchive.cpp", - "src/libs/serialization/src/codecvt_null.cpp", - "src/libs/serialization/src/extended_type_info.cpp", - "src/libs/serialization/src/extended_type_info_no_rtti.cpp", - "src/libs/serialization/src/extended_type_info_typeid.cpp", - "src/libs/serialization/src/polymorphic_iarchive.cpp", - "src/libs/serialization/src/polymorphic_oarchive.cpp", - "src/libs/serialization/src/stl_port.cpp", - "src/libs/serialization/src/text_iarchive.cpp", - "src/libs/serialization/src/text_oarchive.cpp", - "src/libs/serialization/src/text_wiarchive.cpp", - "src/libs/serialization/src/text_woarchive.cpp", - "src/libs/serialization/src/utf8_codecvt_facet.cpp", - "src/libs/serialization/src/void_cast.cpp", - "src/libs/serialization/src/xml_archive_exception.cpp", - "src/libs/serialization/src/xml_grammar.cpp", - "src/libs/serialization/src/xml_iarchive.cpp", - "src/libs/serialization/src/xml_oarchive.cpp", - "src/libs/serialization/src/xml_wgrammar.cpp", - "src/libs/serialization/src/xml_wiarchive.cpp", - "src/libs/serialization/src/xml_woarchive.cpp"] + sources = [ + "src/libs/atomic/src/lockpool.cpp", + "src/libs/date_time/src/gregorian/date_generators.cpp", + "src/libs/date_time/src/gregorian/greg_month.cpp", + "src/libs/date_time/src/gregorian/greg_weekday.cpp", + "src/libs/date_time/src/gregorian/gregorian_types.cpp", + "src/libs/date_time/src/posix_time/posix_time_types.cpp", + "src/libs/system/src/error_code.cpp", + "src/libs/filesystem/src/codecvt_error_category.cpp", + "src/libs/filesystem/src/operations.cpp", + "src/libs/filesystem/src/path.cpp", + "src/libs/filesystem/src/path_traits.cpp", + "src/libs/filesystem/src/portability.cpp", + "src/libs/filesystem/src/unique_path.cpp", + "src/libs/filesystem/src/windows_file_codecvt.cpp", + "src/libs/filesystem/src/filesystem_utf8_codecvt_facet.cpp", + "src/libs/regex/src/c_regex_traits.cpp", + "src/libs/regex/src/cpp_regex_traits.cpp", + "src/libs/regex/src/cregex.cpp", + "src/libs/regex/src/fileiter.cpp", + "src/libs/regex/src/icu.cpp", + "src/libs/regex/src/instances.cpp", + "src/libs/regex/src/posix_api.cpp", + "src/libs/regex/src/regex.cpp", + "src/libs/regex/src/regex_debug.cpp", + "src/libs/regex/src/regex_raw_buffer.cpp", + "src/libs/regex/src/regex_traits_defaults.cpp", + "src/libs/regex/src/static_mutex.cpp", + "src/libs/regex/src/w32_regex_traits.cpp", + "src/libs/regex/src/wc_regex_traits.cpp", + "src/libs/regex/src/wide_posix_api.cpp", + "src/libs/regex/src/winstances.cpp", + "src/libs/regex/src/usinstances.cpp", + "src/libs/program_options/src/cmdline.cpp", + "src/libs/program_options/src/config_file.cpp", + "src/libs/program_options/src/convert.cpp", + "src/libs/program_options/src/options_description.cpp", + "src/libs/program_options/src/positional_options.cpp", + "src/libs/program_options/src/split.cpp", + "src/libs/program_options/src/program_options_utf8_codecvt_facet.cpp", + "src/libs/program_options/src/value_semantic.cpp", + "src/libs/program_options/src/variables_map.cpp", + "src/libs/program_options/src/winmain.cpp", + "src/libs/serialization/src/archive_exception.cpp", + "src/libs/serialization/src/basic_archive.cpp", + "src/libs/serialization/src/basic_iarchive.cpp", + "src/libs/serialization/src/basic_iserializer.cpp", + "src/libs/serialization/src/basic_oarchive.cpp", + "src/libs/serialization/src/basic_oserializer.cpp", + "src/libs/serialization/src/basic_pointer_iserializer.cpp", + "src/libs/serialization/src/basic_pointer_oserializer.cpp", + "src/libs/serialization/src/basic_serializer_map.cpp", + "src/libs/serialization/src/basic_text_iprimitive.cpp", + "src/libs/serialization/src/basic_text_oprimitive.cpp", + "src/libs/serialization/src/basic_text_wiprimitive.cpp", + "src/libs/serialization/src/basic_text_woprimitive.cpp", + "src/libs/serialization/src/basic_xml_archive.cpp", + "src/libs/serialization/src/binary_iarchive.cpp", + "src/libs/serialization/src/binary_oarchive.cpp", + "src/libs/serialization/src/binary_wiarchive.cpp", + "src/libs/serialization/src/binary_woarchive.cpp", + "src/libs/serialization/src/codecvt_null.cpp", + "src/libs/serialization/src/extended_type_info.cpp", + "src/libs/serialization/src/extended_type_info_no_rtti.cpp", + "src/libs/serialization/src/extended_type_info_typeid.cpp", + "src/libs/serialization/src/polymorphic_iarchive.cpp", + "src/libs/serialization/src/polymorphic_oarchive.cpp", + "src/libs/serialization/src/stl_port.cpp", + "src/libs/serialization/src/text_iarchive.cpp", + "src/libs/serialization/src/text_oarchive.cpp", + "src/libs/serialization/src/text_wiarchive.cpp", + "src/libs/serialization/src/text_woarchive.cpp", + "src/libs/serialization/src/utf8_codecvt_facet.cpp", + "src/libs/serialization/src/void_cast.cpp", + "src/libs/serialization/src/xml_archive_exception.cpp", + "src/libs/serialization/src/xml_grammar.cpp", + "src/libs/serialization/src/xml_iarchive.cpp", + "src/libs/serialization/src/xml_oarchive.cpp", + "src/libs/serialization/src/xml_wgrammar.cpp", + "src/libs/serialization/src/xml_wiarchive.cpp", + "src/libs/serialization/src/xml_woarchive.cpp"] - if env["PLATFORM"] != "darwin" or env["target"] == "native" : - sources += [ - "src/libs/program_options/src/parsers.cpp", - ] + if env["PLATFORM"] != "darwin" or env["target"] == "native" : + sources += [ + "src/libs/program_options/src/parsers.cpp", + ] - myenv.MergeFlags(myenv["BOOST_FLAGS"]) - myenv.StaticLibrary("Swiften_Boost", sources) + myenv.MergeFlags(myenv["BOOST_FLAGS"]) + myenv.StaticLibrary("Swiften_Boost", sources) - if ARGUMENTS.get("BOOST_BUILD_BCP") or env.get("BOOST_BUILD_BCP", False) or env.GetOption("clean") : - bcp_env = myenv.Clone() - bcp_env.MergeFlags(bcp_env["BOOST_FLAGS"]) - bcp_env.Append(CPPPATH = ["src/tools/bcp"]) - bcp_env.Replace(CPPDEFINES = [flag for flag in bcp_env["CPPDEFINES"] if flag[0] != "BOOST_FILESYSTEM_VERSION"]) - bcp_env.UseFlags(bcp_env["PLATFORM_FLAGS"]) - bcp_env.Program("bcp", [ - "src/tools/bcp/add_path.cpp", - "src/tools/bcp/add_dependent_lib.cpp", - "src/tools/bcp/bcp_imp.cpp", - "src/tools/bcp/copy_path.cpp", - "src/tools/bcp/file_types.cpp", - "src/tools/bcp/fileview.cpp", - "src/tools/bcp/licence_info.cpp", - "src/tools/bcp/output_licence_info.cpp", - "src/tools/bcp/path_operations.cpp", - "src/tools/bcp/scan_cvs_path.cpp", - "src/tools/bcp/scan_licence.cpp", - "bcp.cpp", - ]) + if ARGUMENTS.get("BOOST_BUILD_BCP") or env.get("BOOST_BUILD_BCP", False) or env.GetOption("clean") : + bcp_env = myenv.Clone() + bcp_env.MergeFlags(bcp_env["BOOST_FLAGS"]) + bcp_env.Append(CPPPATH = ["src/tools/bcp"]) + bcp_env.Replace(CPPDEFINES = [flag for flag in bcp_env["CPPDEFINES"] if flag[0] != "BOOST_FILESYSTEM_VERSION"]) + bcp_env.UseFlags(bcp_env["PLATFORM_FLAGS"]) + bcp_env.Program("bcp", [ + "src/tools/bcp/add_path.cpp", + "src/tools/bcp/add_dependent_lib.cpp", + "src/tools/bcp/bcp_imp.cpp", + "src/tools/bcp/copy_path.cpp", + "src/tools/bcp/file_types.cpp", + "src/tools/bcp/fileview.cpp", + "src/tools/bcp/licence_info.cpp", + "src/tools/bcp/output_licence_info.cpp", + "src/tools/bcp/path_operations.cpp", + "src/tools/bcp/scan_cvs_path.cpp", + "src/tools/bcp/scan_licence.cpp", + "bcp.cpp", + ]) |