diff options
author | redfish <redfish@galactica.pw> | 2016-08-29 13:56:34 -0400 |
---|---|---|
committer | redfish <redfish@galactica.pw> | 2016-08-30 23:04:53 -0400 |
commit | 640a934d5f6163f1069dda933c590bf463d0d5d1 (patch) | |
tree | 6810f4649e2e84817378480d1ec4d7b2e7ad27b1 /tests/CMakeLists.txt | |
parent | tests: cmake: use a list for enabled tests (diff) | |
download | monero-640a934d5f6163f1069dda933c590bf463d0d5d1.tar.xz |
tests: cmake: fix building with system gtest
Issues #980 #983
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9f546590c..33d6c233d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -42,21 +42,22 @@ find_package(GTest) if (GTest_FOUND) include_directories(SYSTEM ${GTEST_INCLUDE_DIRS}) else () + message(STATUS "GTest not found on the system: will use GTest bundled with this source") add_subdirectory(gtest) include_directories(SYSTEM "${gtest_SOURCE_DIR}/include" "${gtest_SOURCE_DIR}") # Emulate the FindGTest module's variable. - set(GTEST_MAIN_LIBRARIES gtest_main) + set(GTEST_LIBRARIES gtest) # Ignore some warnings when building gtest binaries. if(NOT MSVC) - set_property(TARGET gtest gtest_main + set_property(TARGET gtest APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-sign-compare") endif() - set_property(TARGET gtest gtest_main + set_property(TARGET gtest PROPERTY FOLDER "${folder}") endif () |