From 5f4de247123f27136ab50442907115bde9ed694a Mon Sep 17 00:00:00 2001
From: Chuck Atkins <chuck.atkins@kitware.com>
Date: Sun, 25 Jun 2017 21:56:56 -0400
Subject: [PATCH] Fix compatibility issues with CMake v3.5

Fixes #175 (again)
---
 cmake/upstream/FindBZip2.cmake  | 8 ++++----
 cmake/upstream/GoogleTest.cmake | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/cmake/upstream/FindBZip2.cmake b/cmake/upstream/FindBZip2.cmake
index d2307f131..269769e01 100644
--- a/cmake/upstream/FindBZip2.cmake
+++ b/cmake/upstream/FindBZip2.cmake
@@ -36,7 +36,7 @@ if (NOT BZIP2_LIBRARIES)
     find_library(BZIP2_LIBRARY_RELEASE NAMES bz2 bzip2 ${_BZIP2_PATHS} PATH_SUFFIXES lib)
     find_library(BZIP2_LIBRARY_DEBUG NAMES bz2d bzip2d ${_BZIP2_PATHS} PATH_SUFFIXES lib)
 
-    include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+    include(SelectLibraryConfigurations)
     SELECT_LIBRARY_CONFIGURATIONS(BZIP2)
 endif ()
 
@@ -45,14 +45,14 @@ if (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h")
     string(REGEX REPLACE ".* bzip2/libbzip2 version ([0-9]+\\.[^ ]+) of [0-9]+ .*" "\\1" BZIP2_VERSION_STRING "${BZLIB_H}")
 endif ()
 
-include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2
                                   REQUIRED_VARS BZIP2_LIBRARIES BZIP2_INCLUDE_DIR
                                   VERSION_VAR BZIP2_VERSION_STRING)
 
 if (BZIP2_FOUND)
-   include(${CMAKE_CURRENT_LIST_DIR}/CheckSymbolExists.cmake)
-   include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake)
+   include(CheckSymbolExists)
+   include(CMakePushCheckState)
    cmake_push_check_state()
    set(CMAKE_REQUIRED_QUIET ${BZip2_FIND_QUIETLY})
    set(CMAKE_REQUIRED_INCLUDES ${BZIP2_INCLUDE_DIR})
diff --git a/cmake/upstream/GoogleTest.cmake b/cmake/upstream/GoogleTest.cmake
index 7415e0681..944070ae1 100644
--- a/cmake/upstream/GoogleTest.cmake
+++ b/cmake/upstream/GoogleTest.cmake
@@ -188,7 +188,7 @@ function(gtest_add_tests)
         # Note that this check is to allow backwards compatibility so this
         # module can be copied locally in projects to use with older CMake
         # versions
-        if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.8.20170401)
+        if(NOT (CMAKE_VERSION VERSION_LESS 3.8.20170401))
           string(REGEX REPLACE
                  "(^|\\.)DISABLED_" "\\1"
                  orig_test_name "${gtest_test_name}"
-- 
GitLab