Use latest version of Snappy instead of 1.1.6. Build Snappy as a static library rather than shared.
This commit is contained in:
parent
3dd53c2c8c
commit
fad50ea1ca
@ -207,7 +207,7 @@ if(tensorflow_ENABLE_JEMALLOC_SUPPORT)
|
||||
endif()
|
||||
if(tensorflow_ENABLE_SNAPPY_SUPPORT)
|
||||
include(snappy)
|
||||
list(APPEND tensorflow_EXTERNAL_LIBRARIES ${snappy_LIBRARIES})
|
||||
list(APPEND tensorflow_EXTERNAL_LIBRARIES ${snappy_STATIC_LIBRARIES})
|
||||
list(APPEND tensorflow_EXTERNAL_DEPENDENCIES snappy)
|
||||
include_directories(${snappy_INCLUDE_DIR})
|
||||
endif()
|
||||
|
@ -15,14 +15,14 @@
|
||||
include (ExternalProject)
|
||||
|
||||
set(snappy_URL https://github.com/google/snappy.git)
|
||||
set(snappy_TAG "1.1.6")
|
||||
set(snappy_TAG "55924d11095df25ab25c405fadfe93d0a46f82eb")
|
||||
set(snappy_BUILD ${CMAKE_CURRENT_BINARY_DIR}/snappy/src/snappy)
|
||||
set(snappy_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/snappy/src/snappy)
|
||||
|
||||
if(WIN32)
|
||||
set(snappy_LIBRARIES ${snappy_BUILD}/$(Configuration)/snappy.lib)
|
||||
set(snappy_STATIC_LIBRARIES ${snappy_BUILD}/$(Configuration)/snappy.lib)
|
||||
else()
|
||||
set(snappy_LIBRARIES ${snappy_BUILD}/libsnappy.so)
|
||||
set(snappy_STATIC_LIBRARIES ${snappy_BUILD}/libsnappy.a)
|
||||
endif()
|
||||
|
||||
set(snappy_HEADERS
|
||||
@ -42,6 +42,7 @@ ExternalProject_Add(snappy
|
||||
CMAKE_CACHE_ARGS
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
|
||||
-DSNAPPY_BUILD_TESTS:BOOL=OFF
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user