-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for apple clang build issue for GTest
- Loading branch information
Showing
2 changed files
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
|
||
SET(GTEST_SEARCH_PATH | ||
"${GTEST_SOURCE_DIR}" | ||
"${CMAKE_CURRENT_LIST_DIR}/../thirdparty/googletest/googletest") | ||
"${CMAKE_CURRENT_LIST_DIR}/../thirdparty/googletest/googletest" | ||
"${GTEST_SOURCE_DIR}" | ||
) | ||
|
||
IF(UNIX) | ||
LIST(APPEND GTEST_SEARCH_PATH "/usr/src/gtest") | ||
ENDIF() | ||
|
||
FIND_PATH(GTEST_SOURCE_DIR | ||
NAMES CMakeLists.txt src/gtest_main.cc | ||
PATHS ${GTEST_SEARCH_PATH}) | ||
|
||
NAMES CMakeLists.txt src/gtest_main.cc | ||
PATHS ${GTEST_SEARCH_PATH} | ||
NO_DEFAULT_PATH) | ||
|
||
# Debian installs gtest include directory in /usr/include, thus need to look | ||
# for include directory separately from source directory. | ||
FIND_PATH(GTEST_INCLUDE_DIR | ||
NAMES gtest/gtest.h | ||
PATH_SUFFIXES include | ||
HINTS ${GTEST_SOURCE_DIR} | ||
PATHS ${GTEST_SEARCH_PATH}) | ||
NAMES gtest/gtest.h | ||
PATH_SUFFIXES include | ||
HINTS ${GTEST_SOURCE_DIR} | ||
PATHS ${GTEST_SEARCH_PATH} | ||
NO_DEFAULT_PATH) | ||
|
||
INCLUDE(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(GTestSrc DEFAULT_MSG | ||
GTEST_SOURCE_DIR | ||
GTEST_INCLUDE_DIR) | ||
GTEST_SOURCE_DIR | ||
GTEST_INCLUDE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters