mirror of
https://github.com/boostorg/system.git
synced 2025-07-30 20:47:14 +02:00
Rename test/std_ec_mismatch to std_single_instance; test also static and shared libraries
This commit is contained in:
@ -10,11 +10,6 @@
|
||||
|
||||
import testing ;
|
||||
|
||||
lib throw_test : throw_test.cpp : <link>shared:<define>THROW_DYN_LINK=1 ;
|
||||
|
||||
lib single_instance_lib1 : single_instance_1.cpp : <link>shared:<define>SINGLE_INSTANCE_DYN_LINK ;
|
||||
lib single_instance_lib2 : single_instance_2.cpp : <link>shared:<define>SINGLE_INSTANCE_DYN_LINK ;
|
||||
|
||||
rule system-run ( sources + )
|
||||
{
|
||||
local result ;
|
||||
@ -32,6 +27,8 @@ system-run error_code_test.cpp ;
|
||||
system-run error_code_user_test.cpp ;
|
||||
system-run system_error_test.cpp ;
|
||||
|
||||
lib throw_test : throw_test.cpp : <link>shared:<define>THROW_DYN_LINK=1 ;
|
||||
|
||||
run dynamic_link_test.cpp throw_test : : : <link>shared : throw_test_shared ;
|
||||
|
||||
system-run initialization_test.cpp ;
|
||||
@ -42,6 +39,9 @@ run config_test.cpp : : : <test-info>always_show_run_output ;
|
||||
system-run std_interop_test.cpp ;
|
||||
system-run std_mismatch_test.cpp ;
|
||||
|
||||
lib single_instance_lib1 : single_instance_1.cpp : <link>shared:<define>SINGLE_INSTANCE_DYN_LINK ;
|
||||
lib single_instance_lib2 : single_instance_2.cpp : <link>shared:<define>SINGLE_INSTANCE_DYN_LINK ;
|
||||
|
||||
system-run single_instance_test.cpp single_instance_1.cpp single_instance_2.cpp ;
|
||||
run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : : <link>static : single_instance_lib_static ;
|
||||
run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : : <link>shared : single_instance_lib_shared ;
|
||||
@ -63,4 +63,9 @@ run quick.cpp ;
|
||||
|
||||
run warnings_test.cpp : : : <warnings>all <warnings-as-errors>on <toolset>gcc:<cxxflags>-Wnon-virtual-dtor <toolset>clang:<cxxflags>-Wnon-virtual-dtor ;
|
||||
|
||||
system-run std_ec_mismatch_test.cpp std_ec_mismatch_1.cpp std_ec_mismatch_2.cpp ;
|
||||
lib std_single_instance_lib1 : std_single_instance_1.cpp : <link>shared:<define>STD_SINGLE_INSTANCE_DYN_LINK ;
|
||||
lib std_single_instance_lib2 : std_single_instance_2.cpp : <link>shared:<define>STD_SINGLE_INSTANCE_DYN_LINK ;
|
||||
|
||||
system-run std_single_instance_test.cpp std_single_instance_1.cpp std_single_instance_2.cpp ;
|
||||
run std_single_instance_test.cpp std_single_instance_lib1 std_single_instance_lib2 : : : <link>static : std_single_instance_lib_static ;
|
||||
run std_single_instance_test.cpp std_single_instance_lib1 std_single_instance_lib2 : : : <link>shared : std_single_instance_lib_shared ;
|
||||
|
@ -2,6 +2,14 @@
|
||||
// Copyright 2019 Peter Dimov.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(STD_SINGLE_INSTANCE_DYN_LINK)
|
||||
# define EXPORT BOOST_SYMBOL_EXPORT
|
||||
#else
|
||||
# define EXPORT
|
||||
#endif
|
||||
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
|
||||
@ -11,12 +19,12 @@
|
||||
namespace lib1
|
||||
{
|
||||
|
||||
std::error_code get_system_code()
|
||||
EXPORT std::error_code get_system_code()
|
||||
{
|
||||
return boost::system::error_code( 0, boost::system::system_category() );
|
||||
}
|
||||
|
||||
std::error_code get_generic_code()
|
||||
EXPORT std::error_code get_generic_code()
|
||||
{
|
||||
return boost::system::error_code( 0, boost::system::generic_category() );
|
||||
}
|
@ -2,6 +2,14 @@
|
||||
// Copyright 2019 Peter Dimov.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(STD_SINGLE_INSTANCE_DYN_LINK)
|
||||
# define EXPORT BOOST_SYMBOL_EXPORT
|
||||
#else
|
||||
# define EXPORT
|
||||
#endif
|
||||
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
|
||||
@ -11,12 +19,12 @@
|
||||
namespace lib2
|
||||
{
|
||||
|
||||
std::error_code get_system_code()
|
||||
EXPORT std::error_code get_system_code()
|
||||
{
|
||||
return boost::system::error_code( 0, boost::system::system_category() );
|
||||
}
|
||||
|
||||
std::error_code get_generic_code()
|
||||
EXPORT std::error_code get_generic_code()
|
||||
{
|
||||
return boost::system::error_code( 0, boost::system::generic_category() );
|
||||
}
|
Reference in New Issue
Block a user