Fix the CMake build on Windows when using PThreads
authorChristopher Dykes <cdykes@fb.com>
Tue, 2 May 2017 17:31:18 +0000 (10:31 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 2 May 2017 17:36:11 +0000 (10:36 -0700)
Summary: I broke things, so now I have to fix them.

Reviewed By: yfeldblum

Differential Revision: D4981674

fbshipit-source-id: 7df4d78cf4f984df158051a3a8b277a0bcad583b

CMake/folly-config.h.cmake
folly/ThreadName.cpp

index 7841aa0..1cefa40 100755 (executable)
@@ -16,7 +16,7 @@
 \r
 #pragma once\r
 \r
-#cmakedefine FOLLY_HAVE_PTHREAD\r
+#cmakedefine FOLLY_HAVE_PTHREAD 1\r
 \r
 #define FOLLY_HAVE_LIBGFLAGS 1\r
 #define FOLLY_UNUSUAL_GFLAGS_NAMESPACE 1\r
index acd6163..3e2d9aa 100644 (file)
@@ -58,7 +58,7 @@ bool canSetOtherThreadName() {
 }
 
 bool setThreadName(std::thread::id tid, StringPiece name) {
-#if !FOLLY_HAVE_PTHREAD
+#if !FOLLY_HAVE_PTHREAD || _WIN32
   return false;
 #else
   static_assert(