[MLGO] Strip TF_PIP cmake variable

This should fix build breaks for 'development' mode. The other modes
were unaffected - 'release' because it doesn't use TFUtils.cpp, and the
mixed mode because the AOT compiled code brings in the necessary include
dirs anyway.
This commit is contained in:
Mircea Trofin 2021-07-22 16:26:46 -07:00
parent ea452353c0
commit 207c4d4d37
1 changed files with 3 additions and 1 deletions

View File

@ -803,8 +803,10 @@ if (TENSORFLOW_C_LIB_PATH)
endif()
string(REGEX MATCH "Location: ([^\n]*\n)" TF_PIP_LOC "${TF_PIP_OUT}")
string(REPLACE "Location: " "" TF_PIP ${TF_PIP_LOC})
set(TF_PROTO_HEADERS ${TF_PIP}/tensorflow/include)
string(STRIP ${TF_PIP} TF_PIP)
set(TF_PROTO_HEADERS "${TF_PIP}/tensorflow/include")
endif()
message(STATUS "Using Tensorflow headers under: ${TF_PROTO_HEADERS}")
include_directories(${TF_PROTO_HEADERS})
add_definitions("-DGOOGLE_PROTOBUF_NO_RTTI")
add_definitions("-D_GLIBCXX_USE_CXX11_ABI=0")