Commit a84774d6 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon Committed by GitHub
Browse files

Merge pull request #188 from chuckatkins/fix-cmake35-compatibility

Fix compatibility issues with CMake v3.5
parents c4ccdfca 5f4de247
......@@ -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})
......
......@@ -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}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment