aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/cmake/external/re2.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/cmake/external/re2.cmake')
-rw-r--r--tensorflow/contrib/cmake/external/re2.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/tensorflow/contrib/cmake/external/re2.cmake b/tensorflow/contrib/cmake/external/re2.cmake
index 2a193c92db..1da2ff6be2 100644
--- a/tensorflow/contrib/cmake/external/re2.cmake
+++ b/tensorflow/contrib/cmake/external/re2.cmake
@@ -14,6 +14,8 @@ set(re2_INCLUDES ${re2_BUILD})
# For the rest, we'll just add the build dir as an include dir.
set(re2_HEADERS
"${re2_BUILD}/re2/re2.h"
+ "${re2_BUILD}/re2/stringpiece.h"
+ "${re2_BUILD}/re2/variadic_function.h"
)
ExternalProject_Add(re2
@@ -26,11 +28,12 @@ ExternalProject_Add(re2
CMAKE_CACHE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
+ -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
)
## put re2 includes in the directory where they are expected
add_custom_target(re2_create_destination_dir
- COMMAND ${CMAKE_COMMAND} -E make_directory ${re2_INCLUDE_DIR}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${re2_INCLUDE_DIR}/re2
DEPENDS re2)
add_custom_target(re2_copy_headers_to_destination
@@ -38,7 +41,7 @@ add_custom_target(re2_copy_headers_to_destination
foreach(header_file ${re2_HEADERS})
add_custom_command(TARGET re2_copy_headers_to_destination PRE_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy ${header_file} ${re2_INCLUDE_DIR})
+ COMMAND ${CMAKE_COMMAND} -E copy ${header_file} ${re2_INCLUDE_DIR}/re2)
endforeach()
ADD_LIBRARY(re2_lib STATIC IMPORTED