diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ac6b9ac6efa6ab754dfdb2fc43867b70e3e23334..74c38034bc67f3fc8f3018a62c55f0c76b61448a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,8 +1,11 @@ # Retrieve googletest from github & compile add_subdirectory(gtest) -# # Include gtest directory. -# include_directories(${GTEST_INCLUDE_DIRS}) +# Include gtest directory. +if(${CMAKE_VERSION} VERSION_LESS "3.11.0") + message("CMake version less than 3.11.0") + include_directories(${GTEST_INCLUDE_DIRS}) +endif() ############# USE THIS TEST AS AN EXAMPLE ################# # # diff --git a/test/gtest/CMakeLists.txt b/test/gtest/CMakeLists.txt index 69d16a9ef95acc8f8ad0529d07da9edb5d25a634..74db45c34f8d375ff91a4447f522bdb5f581a9c0 100644 --- a/test/gtest/CMakeLists.txt +++ b/test/gtest/CMakeLists.txt @@ -52,8 +52,6 @@ if(${CMAKE_VERSION} VERSION_LESS "3.11.0") "IMPORTED_LINK_INTERFACE_LIBRARIES" "${CMAKE_THREAD_LIBS_INIT}" ) - include_directories(${GTEST_INCLUDE_DIRS}) - else() message("CMake version equal or greater than 3.11.0")