From 78a6f4baaa9510361f400c1abaf493f8ef12b665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Vallv=C3=A9=20Navarro?= <jvallve@iri.upc.edu> Date: Mon, 2 May 2022 19:55:07 +0200 Subject: [PATCH] trying to fix cmake old --- test/CMakeLists.txt | 7 +++++-- test/gtest/CMakeLists.txt | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ac6b9ac6e..74c38034b 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 69d16a9ef..74db45c34 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") -- GitLab