aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/cmake/external/snappy.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/cmake/external/snappy.cmake')
-rw-r--r--tensorflow/contrib/cmake/external/snappy.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/tensorflow/contrib/cmake/external/snappy.cmake b/tensorflow/contrib/cmake/external/snappy.cmake
index 2d2451521c..926c271fd9 100644
--- a/tensorflow/contrib/cmake/external/snappy.cmake
+++ b/tensorflow/contrib/cmake/external/snappy.cmake
@@ -40,11 +40,15 @@ ExternalProject_Add(snappy
LOG_CONFIGURE ON
LOG_BUILD ON
CMAKE_CACHE_ARGS
+ if(tensorflow_ENABLE_POSITION_INDEPENDENT_CODE)
+ -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
+ else()
+ -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=OFF
+ endif()
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
-DSNAPPY_BUILD_TESTS:BOOL=OFF
- -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
)
# actually enables snappy in the source code
-add_definitions(-DTF_USE_SNAPPY)
+add_definitions(-DTF_USE_SNAPPY) \ No newline at end of file