From 8c497d146d5865ea0dcc6177a28d0688f68d9bd4 Mon Sep 17 00:00:00 2001 From: syntheticpp Date: Mon, 16 Oct 2006 11:48:13 +0000 Subject: [PATCH] by default Loki is compiled without thread support, so we must disable the dependency on thread classes (StrongPtr) to avaoid linker errors when compiling with the default build process. Should we change the default threading of Loki? git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@729 7ec92016-0320-0410-acc4-a06ded1c099a --- test/SmartPtr/LockTest.cpp | 8 ++++++++ test/SmartPtr/main.cpp | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/test/SmartPtr/LockTest.cpp b/test/SmartPtr/LockTest.cpp index 499bfc5..47c91de 100644 --- a/test/SmartPtr/LockTest.cpp +++ b/test/SmartPtr/LockTest.cpp @@ -14,6 +14,9 @@ // ---------------------------------------------------------------------------- + +#ifdef LOKI_OBJECT_LEVEL_THREADING + /// @note This test uses LOKI_OBJECT_LEVEL_THREADING because StrongPtr's /// LockableTwoRefCounts policy can't be used with a single-threaded model. /// It requires either object-level-locking or class-level-locking. @@ -322,9 +325,14 @@ void DoLockedPtrTest( void ) UnsafeA::Destroy(); } +#endif //#ifdef LOKI_OBJECT_LEVEL_THREADING + // ---------------------------------------------------------------------------- // $Log$ +// Revision 1.4 2006/10/16 11:48:13 syntheticpp +// by default Loki is compiled without thread support, so we must disable the dependency on thread classes (StrongPtr) to avaoid linker errors when compiling with the default build process. Should we change the default threading of Loki? +// // Revision 1.3 2006/10/14 00:06:15 rich_sposato // Fixed a couple of bugs. Added lines to send test info to output. Added // use of ScopeGuard. Removed superfluous code. diff --git a/test/SmartPtr/main.cpp b/test/SmartPtr/main.cpp index 3ddb564..9e68ce6 100644 --- a/test/SmartPtr/main.cpp +++ b/test/SmartPtr/main.cpp @@ -1044,10 +1044,12 @@ int main( unsigned int argc, const char * argv[] ) DoOwnershipConversionTests(); DoInheritanceConversionTests(); +#ifdef LOKI_OBJECT_LEVEL_THREADING if ( doThreadTest ) { DoLockedPtrTest(); } +#endif // Check that nothing was leaked. assert( BaseClass::AllDestroyed() ); @@ -1063,6 +1065,9 @@ int main( unsigned int argc, const char * argv[] ) // ---------------------------------------------------------------------------- // $Log$ +// Revision 1.12 2006/10/16 11:48:13 syntheticpp +// by default Loki is compiled without thread support, so we must disable the dependency on thread classes (StrongPtr) to avaoid linker errors when compiling with the default build process. Should we change the default threading of Loki? +// // Revision 1.11 2006/10/13 23:59:42 rich_sposato // Added check for -t command line parameter to do lock-thread test. // Changed ending chars of some lines from LF to CR-LF to be consistent.