THRIFT-2893 CMake build fails with boost thread or std thread
Following changes are made to fix the build
* Add USE_..._THREAD compiler definitions correctly
* Link to boost_thread and boost_system when configured with boost thread
* Link to pthread if platform is posix and std thread is used
* Use PlatformThreadFactory in test code
diff --git a/lib/cpp/test/concurrency/ThreadManagerTests.h b/lib/cpp/test/concurrency/ThreadManagerTests.h
index 27bf6c5..904948c 100644
--- a/lib/cpp/test/concurrency/ThreadManagerTests.h
+++ b/lib/cpp/test/concurrency/ThreadManagerTests.h
@@ -106,7 +106,7 @@
shared_ptr<PlatformThreadFactory> threadFactory
= shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory());
-#ifndef USE_BOOST_THREAD
+#if !USE_BOOST_THREAD && !USE_STD_THREAD
threadFactory->setPriority(PosixThreadFactory::HIGHEST);
#endif
threadManager->threadFactory(threadFactory);
@@ -253,7 +253,7 @@
shared_ptr<PlatformThreadFactory> threadFactory
= shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory());
-#ifndef USE_BOOST_THREAD
+#if !USE_BOOST_THREAD && !USE_STD_THREAD
threadFactory->setPriority(PosixThreadFactory::HIGHEST);
#endif
threadManager->threadFactory(threadFactory);