aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-11-12 12:52:16 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-12 12:56:53 -0800
commit24e368f1a1f1edd4c1f6c13b165c8aa5057c7f11 (patch)
treeadec74cf3542175fea64148b1df4c4261c77f856
parent2eb51b6786ad8c81cd3e7eb2ab9b7db6d4343360 (diff)
Use latest version of nsync in cmake builds; bring TensorFlow's CMakeLists.txt for nsync up to date for Mac.
Update the git hash for nsync for use by cmake when fetching nsync. Update TensorFlow's copy of nsync's CMakeLists.txt file, which has fixed for the Mac. PiperOrigin-RevId: 175463772
-rw-r--r--tensorflow/contrib/cmake/external/nsync.cmake2
-rw-r--r--tensorflow/contrib/cmake/patches/nsync/CMakeLists.txt10
2 files changed, 11 insertions, 1 deletions
diff --git a/tensorflow/contrib/cmake/external/nsync.cmake b/tensorflow/contrib/cmake/external/nsync.cmake
index 2c42377f50..155c91cb97 100644
--- a/tensorflow/contrib/cmake/external/nsync.cmake
+++ b/tensorflow/contrib/cmake/external/nsync.cmake
@@ -16,7 +16,7 @@ include (ExternalProject)
set(nsync_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/external/nsync/public)
set(nsync_URL https://github.com/google/nsync)
-set(nsync_TAG 394e71f0ebeed6788ae6c84d42c1bedf6e1ee9f7)
+set(nsync_TAG 93815892dddafe9146a5f7e7042281d59d0f4323)
set(nsync_BUILD ${CMAKE_CURRENT_BINARY_DIR}/nsync/src/nsync)
set(nsync_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/nsync/install)
diff --git a/tensorflow/contrib/cmake/patches/nsync/CMakeLists.txt b/tensorflow/contrib/cmake/patches/nsync/CMakeLists.txt
index fbd89bad07..594c2492d4 100644
--- a/tensorflow/contrib/cmake/patches/nsync/CMakeLists.txt
+++ b/tensorflow/contrib/cmake/patches/nsync/CMakeLists.txt
@@ -61,9 +61,15 @@ if ("${NSYNC_LANGUAGE}X" STREQUAL "c++11X")
)
elseif ("${CMAKE_SYSTEM_NAME}X" STREQUAL "DarwinX")
include_directories ("${PROJECT_SOURCE_DIR}/platform/macos")
+ include_directories ("${PROJECT_SOURCE_DIR}/platform/posix")
+ # Some versions of MacOS, such as Sierra, require _DARWIN_C_SOURCE
+ # when including certin C++ standard header files, such as <mutex>.
+ add_definitions ("-D_DARWIN_C_SOURCE")
add_compile_options ("-std=c++11")
set (NSYNC_OS_SRC
${NSYNC_OS_CPP_SRC}
+ "platform/posix/src/clock_gettime.c"
+ "platform/posix/src/nsync_semaphore_mutex.c"
)
set (NSYNC_TEST_OS_SRC
"platform/posix/src/start_thread.c"
@@ -138,6 +144,10 @@ if (NOT "${NSYNC_LANGUAGE}X" STREQUAL "c++11X")
elseif ("${CMAKE_SYSTEM_NAME}X" STREQUAL "DarwinX")
include_directories ("${PROJECT_SOURCE_DIR}/platform/macos")
set (NSYNC_POSIX ON)
+ set (NSYNC_OS_EXTRA_SRC
+ "platform/posix/src/clock_gettime.c"
+ "platform/posix/src/nsync_semaphore_mutex.c"
+ )
include_directories ("${PROJECT_SOURCE_DIR}/platform/posix")
elseif ("${CMAKE_SYSTEM_NAME}X" STREQUAL "LinuxX")
include_directories ("${PROJECT_SOURCE_DIR}/platform/linux")