diff --git a/tests/extern/googletest/CMakeLists.txt b/tests/extern/googletest/CMakeLists.txt index 647979e8a3..47fc5e07aa 100644 --- a/tests/extern/googletest/CMakeLists.txt +++ b/tests/extern/googletest/CMakeLists.txt @@ -10,8 +10,12 @@ endif (POLICY CMP0048) project(googletest-distribution) set(GOOGLETEST_VERSION 1.11.0) -if (CMAKE_VERSION VERSION_GREATER "3.0.2") - if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX) +if (CMAKE_VERSION VERSION_LESS "3.1") + add_definitions(-std=c++11) +else() + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + if(NOT CYGWIN) set(CMAKE_CXX_EXTENSIONS OFF) endif() endif() @@ -29,4 +33,4 @@ if(BUILD_GMOCK) add_subdirectory( googlemock ) else() add_subdirectory( googletest ) -endif() +endif() \ No newline at end of file