Skip to content

Commit

Permalink
Add gtest include directory to -I flags if found.
Browse files Browse the repository at this point in the history
Otherwise it won't be found when cross-compiling.
  • Loading branch information
iphydf committed Feb 9, 2018
1 parent a940f26 commit 05912fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ if(EXISTS "/usr/src/gtest/src/gtest-all.cc")
add_library(gtest
/usr/src/gtest/src/gtest-all.cc
/usr/src/gtest/src/gtest_main.cc)
include_directories(/usr/src/gtest/include)
target_include_directories(gtest PRIVATE /usr/src/gtest)
check_cxx_compiler_flag("-w" HAVE_CXX_W QUIET)
check_cxx_compiler_flag("-Wno-global-constructors" HAVE_CXX_W_NO_GLOBAL_CONSTRUCTORS QUIET)
Expand Down

0 comments on commit 05912fd

Please sign in to comment.