未验证 提交 bd26a7f8 编写于 作者: F freemine 提交者: GitHub

fix compiler error when linking with static gtest lib (#11956)

上级 430bad97
......@@ -12,7 +12,9 @@ IF (HEADER_GTEST_INCLUDE_DIR AND (LIB_GTEST_STATIC_DIR OR LIB_GTEST_SHARED_DIR))
SET(CMAKE_CXX_STANDARD 11)
INCLUDE_DIRECTORIES(/usr/include /usr/local/include)
IF (NOT LIB_GTEST_STATIC_DIR)
LINK_DIRECTORIES(/usr/lib /usr/local/lib)
ENDIF()
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST)
......
......@@ -12,7 +12,9 @@ IF (HEADER_GTEST_INCLUDE_DIR AND (LIB_GTEST_STATIC_DIR OR LIB_GTEST_SHARED_DIR))
SET(CMAKE_CXX_STANDARD 11)
INCLUDE_DIRECTORIES(/usr/include /usr/local/include)
IF (NOT LIB_GTEST_STATIC_DIR)
LINK_DIRECTORIES(/usr/lib /usr/local/lib)
ENDIF()
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST)
......
......@@ -12,7 +12,9 @@ IF (HEADER_GTEST_INCLUDE_DIR AND (LIB_GTEST_STATIC_DIR OR LIB_GTEST_SHARED_DIR))
SET(CMAKE_CXX_STANDARD 11)
INCLUDE_DIRECTORIES(/usr/include /usr/local/include)
IF (NOT LIB_GTEST_STATIC_DIR)
LINK_DIRECTORIES(/usr/lib /usr/local/lib)
ENDIF()
INCLUDE_DIRECTORIES(${HEADER_GTEST_INCLUDE_DIR})
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册