From ca8cb19e5349c9df37d6899d656241fbb1eb7cbf Mon Sep 17 00:00:00 2001 From: Robert Ramey Date: Fri, 10 Aug 2012 01:39:53 +0000 Subject: [PATCH] adjustment for QNX altered Jamfiles to fix test with DLLS on static builds [SVN r79951] --- src/codecvt_null.cpp | 2 +- test/Jamfile.v2 | 15 +++++++++------ test/polymorphic_base.hpp | 12 +++++++++++- test/polymorphic_derived2.hpp | 10 ---------- test/test_complex.cpp | 13 +++++++++---- test/test_dll_exported.cpp | 2 +- test/test_non_default_ctor.cpp | 9 +++++---- test/test_non_intrusive.cpp | 11 ++++++----- vc7ide/Serialization.vcproj | 12 +++++++++--- 9 files changed, 51 insertions(+), 35 deletions(-) diff --git a/src/codecvt_null.cpp b/src/codecvt_null.cpp index b6c06bdc..80ba2a33 100644 --- a/src/codecvt_null.cpp +++ b/src/codecvt_null.cpp @@ -47,7 +47,7 @@ codecvt_null::do_out( BOOST_WARCHIVE_DECL(std::codecvt_base::result) codecvt_null::do_in( - std::mbstate_t & state, + std::mbstate_t & /*state*/, const char * first1, const char * last1, const char * & next1, diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index e5524d21..d1f6e249 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -31,7 +31,7 @@ lib dll_a_lib dll_a.cpp ../build//boost_serialization : - shared + # shared ; lib dll_base_lib @@ -39,7 +39,7 @@ lib dll_base_lib dll_base.cpp ../build//boost_serialization : - shared + # shared ; lib dll_derived2_lib @@ -48,7 +48,7 @@ lib dll_derived2_lib dll_base_lib ../build//boost_serialization : - shared + # shared ; lib dll_polymorphic_derived2_lib @@ -56,7 +56,7 @@ lib dll_polymorphic_derived2_lib polymorphic_derived2.cpp ../build//boost_serialization : - shared + # shared ; test-suite "serialization" : @@ -112,9 +112,12 @@ test-suite "serialization" : if ! $(BOOST_ARCHIVE_LIST) { test-suite "serialization2" : - [ test-bsl-run test_dll_exported : : dll_polymorphic_derived2_lib : shared ] - [ test-bsl-run test_dll_simple : : dll_a_lib : shared ] + [ test-bsl-run test_dll_exported : : dll_polymorphic_derived2_lib ] + [ test-bsl-run test_dll_simple : : dll_a_lib ] [ compile test_dll_plugin.cpp ] + # Running the following test requires that the test know the directory + # in which the dll is stored. I don't know how to extract this from bjam + # [ test-bsl-run test_dll_plugin : : dll_polymorphic_derived2_lib ] [ test-bsl-run test_private_ctor ] [ test-bsl-run test_reset_object_address : A ] [ test-bsl-run test_void_cast ] diff --git a/test/polymorphic_base.hpp b/test/polymorphic_base.hpp index b1493cfc..da44a76d 100644 --- a/test/polymorphic_base.hpp +++ b/test/polymorphic_base.hpp @@ -22,7 +22,17 @@ #include #include -class polymorphic_base +#include "test_decl.hpp" + +#if defined(POLYMORPHIC_DERIVED_IMPORT) + #define DLL_DECL IMPORT_DECL +#elif defined(POLYMORPHIC_DERIVED_EXPORT) + #define DLL_DECL EXPORT_DECL +#else + #define DLL_DECL(x) +#endif + +class DLL_DECL(BOOST_PP_EMPTY()) polymorphic_base { friend class boost::serialization::access; template diff --git a/test/polymorphic_derived2.hpp b/test/polymorphic_derived2.hpp index 47982e39..0b5c002f 100644 --- a/test/polymorphic_derived2.hpp +++ b/test/polymorphic_derived2.hpp @@ -26,16 +26,6 @@ #include "polymorphic_base.hpp" -#include "test_decl.hpp" - -#if defined(POLYMORPHIC_DERIVED2_IMPORT) - #define DLL_DECL IMPORT_DECL -#elif defined(POLYMORPHIC_DERIVED2_EXPORT) - #define DLL_DECL EXPORT_DECL -#else - #define DLL_DECL(x) -#endif - class DLL_DECL(BOOST_PP_EMPTY()) polymorphic_derived2 : public polymorphic_base { diff --git a/test/test_complex.cpp b/test/test_complex.cpp index ef627694..6fe3bb21 100644 --- a/test/test_complex.cpp +++ b/test/test_complex.cpp @@ -13,12 +13,17 @@ #include // NULL #include // rand #include // remove +#include +#include + #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ +namespace std{ + using ::rand; + using ::fabs; using ::remove; -#ifndef UNDER_CE - using ::numeric_limits; -#endif + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) + using ::numeric_limits; + #endif } #endif diff --git a/test/test_dll_exported.cpp b/test/test_dll_exported.cpp index 7b4c8e53..41a2b2ad 100644 --- a/test/test_dll_exported.cpp +++ b/test/test_dll_exported.cpp @@ -66,7 +66,7 @@ BOOST_CLASS_EXPORT(polymorphic_derived1) // MWerks users can do this to make their code work BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(polymorphic_base, polymorphic_derived1) -#define POLYMORPHIC_DERIVED2_IMPORT +#define POLYMORPHIC_DERIVED_IMPORT #include "polymorphic_derived2.hpp" // save exported polymorphic class diff --git a/test/test_non_default_ctor.cpp b/test/test_non_default_ctor.cpp index 4e79869b..495cede5 100644 --- a/test/test_non_default_ctor.cpp +++ b/test/test_non_default_ctor.cpp @@ -18,15 +18,16 @@ #include // for rand() #include // for fabs() #include -#include +#include + #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::rand; using ::fabs; using ::remove; -#ifndef UNDER_CE - using ::numeric_limits; -#endif + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) + using ::numeric_limits; + #endif } #endif diff --git a/test/test_non_intrusive.cpp b/test/test_non_intrusive.cpp index e8291f0d..76cc25dc 100644 --- a/test/test_non_intrusive.cpp +++ b/test/test_non_intrusive.cpp @@ -18,14 +18,15 @@ #include // for fabs() #include #include + #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ - using ::rand; - using ::fabs; + using ::rand; + using ::fabs; using ::remove; -#ifndef UNDER_CE - using ::numeric_limits; -#endif + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(UNDER_CE) + using ::numeric_limits; + #endif } #endif diff --git a/vc7ide/Serialization.vcproj b/vc7ide/Serialization.vcproj index 9326ee06..db6ca7e6 100644 --- a/vc7ide/Serialization.vcproj +++ b/vc7ide/Serialization.vcproj @@ -356,6 +356,9 @@ + + @@ -386,9 +389,6 @@ - - + + +