THRIFT-4732: windows cmake refinements and add windows docker build support
diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt
index e12c08c..8e5ebcf 100755
--- a/lib/cpp/CMakeLists.txt
+++ b/lib/cpp/CMakeLists.txt
@@ -158,8 +158,8 @@
     include_directories(SYSTEM ${LIBEVENT_INCLUDE_DIRS})
 
     ADD_LIBRARY_THRIFT(thriftnb ${thriftcppnb_SOURCES})
+    LINK_AGAINST_THRIFT_LIBRARY(thriftnb thrift)
     TARGET_LINK_LIBRARIES_THRIFT(thriftnb ${SYSLIBS} ${LIBEVENT_LIBRARIES})
-    TARGET_LINK_LIBRARIES_THRIFT_AGAINST_THRIFT_LIBRARY(thriftnb thrift)
 endif()
 
 if(WITH_ZLIB)
diff --git a/lib/cpp/README.md b/lib/cpp/README.md
index 5806f7b..bc47d2d 100755
--- a/lib/cpp/README.md
+++ b/lib/cpp/README.md
@@ -240,8 +240,13 @@
 anything that relied on it has been changed to directly use C++11 concepts.
 
 The classes BoostThreadFactory, PosixThreadFactory, StdThreadFactory, and
-PlatformThreadFactory will all be removed, and we will use a ThreadFactory
-based on C++11.
+PlatformThreadFactory have been removed, and we will use a ThreadFactory
+based on C++11 (essentially StdThreadFactory was renamed ThreadFactory).
+
+The CMake build options WITH_SHARED_LIBS and WITH_STATIC_LIBS are deprecated.
+The project no longer performs a side-by-side static and shared build; you
+tell CMake through BUILD_SHARED_LIBS whether to make shared or static
+libraries now.  This is CMake standard behavior.
 
 ## 0.11.0
 
diff --git a/lib/cpp/src/thrift/TOutput.cpp b/lib/cpp/src/thrift/TOutput.cpp
index ae3a9e2..af36137 100644
--- a/lib/cpp/src/thrift/TOutput.cpp
+++ b/lib/cpp/src/thrift/TOutput.cpp
@@ -29,6 +29,8 @@
 
 TOutput GlobalOutput;
 
+TOutput::TOutput() : f_(&errorTimeWrapper) {}
+
 void TOutput::printf(const char* message, ...) {
 #ifndef THRIFT_SQUELCH_CONSOLE_OUTPUT
   // Try to reduce heap usage, even if printf is called rarely.
diff --git a/lib/cpp/src/thrift/TOutput.h b/lib/cpp/src/thrift/TOutput.h
index 1375f73..6135cfa 100644
--- a/lib/cpp/src/thrift/TOutput.h
+++ b/lib/cpp/src/thrift/TOutput.h
@@ -25,7 +25,7 @@
 
 class TOutput {
 public:
-  TOutput() : f_(&errorTimeWrapper) {}
+  TOutput();
 
   inline void setOutputFunction(void (*function)(const char*)) { f_ = function; }
 
diff --git a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
index 4576fa1..db407f2 100644
--- a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
@@ -898,7 +898,7 @@
       }
       try {
         num = fromString<double>(str);
-      } catch (std::runtime_error& e) {
+      } catch (const std::runtime_error&) {
         throw TProtocolException(TProtocolException::INVALID_DATA,
                                      "Expected numeric value; got \"" + str + "\"");
       }
@@ -911,7 +911,7 @@
     result += readJSONNumericChars(str);
     try {
       num = fromString<double>(str);
-    } catch (std::runtime_error& e) {
+    } catch (const std::runtime_error&) {
       throw TProtocolException(TProtocolException::INVALID_DATA,
                                    "Expected numeric value; got \"" + str + "\"");
     }