diff --git a/appveyor.yml b/appveyor.yml
index 23f9cc6..87300da 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -63,11 +63,11 @@ install:
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\system
- python tools/boostdep/depinst/depinst.py system
- cmd /c bootstrap
- - b2 headers
+ - b2 -d0 headers
build: off
test_script:
- PATH=%ADDPATH%%PATH%
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
- - b2 -j 3 libs/system/test toolset=%TOOLSET% %CXXSTD%
+ - b2 -j3 libs/system/test toolset=%TOOLSET% %CXXSTD%
diff --git a/test/Jamfile.v2 b/test/Jamfile.v2
index 3457b77..3fb218d 100644
--- a/test/Jamfile.v2
+++ b/test/Jamfile.v2
@@ -21,6 +21,9 @@ project
static:BOOST_SYSTEM_STATIC_LINK=1
;
+ lib single_instance_lib1 : single_instance_1.cpp : shared:SINGLE_INSTANCE_DYN_LINK ;
+ lib single_instance_lib2 : single_instance_2.cpp : shared:SINGLE_INSTANCE_DYN_LINK ;
+
rule cxx03 ( properties * )
{
local result ;
@@ -107,6 +110,8 @@ project
[ system-run- std_interop_test.cpp ]
[ system-run std_mismatch_test.cpp ]
[ 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 : : : static : single_instance_lib_static ]
+ [ run single_instance_test.cpp single_instance_lib1 single_instance_lib2 : : : shared : single_instance_lib_shared ]
[ system-run before_main_test.cpp ]
[ system-run- constexpr_test.cpp ]
;
diff --git a/test/single_instance_1.cpp b/test/single_instance_1.cpp
index 35a7240..3bee8a8 100644
--- a/test/single_instance_1.cpp
+++ b/test/single_instance_1.cpp
@@ -2,19 +2,26 @@
// Copyright 2018 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
-#include
+#include
+#if defined(SINGLE_INSTANCE_DYN_LINK) && defined(BOOST_HAS_DECLSPEC)
+# define EXPORT __declspec(dllexport)
+#else
+# define EXPORT
+#endif
+
+#include
using namespace boost::system;
namespace lib1
{
-error_code get_system_code()
+EXPORT error_code get_system_code()
{
return error_code( 0, system_category() );
}
-error_code get_generic_code()
+EXPORT error_code get_generic_code()
{
return error_code( 0, generic_category() );
}
diff --git a/test/single_instance_2.cpp b/test/single_instance_2.cpp
index 91cbe24..6a3cc63 100644
--- a/test/single_instance_2.cpp
+++ b/test/single_instance_2.cpp
@@ -2,19 +2,26 @@
// Copyright 2018 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
-#include
+#include
+#if defined(SINGLE_INSTANCE_DYN_LINK) && defined(BOOST_HAS_DECLSPEC)
+# define EXPORT __declspec(dllexport)
+#else
+# define EXPORT
+#endif
+
+#include
using namespace boost::system;
namespace lib2
{
-error_code get_system_code()
+EXPORT error_code get_system_code()
{
return error_code( 0, system_category() );
}
-error_code get_generic_code()
+EXPORT error_code get_generic_code()
{
return error_code( 0, generic_category() );
}