Bumped CMake mimimum version to 3.11 because of include_guard.

This commit is contained in:
Cristian Adam
2018-04-24 04:52:02 +02:00
parent 98fdb657ce
commit d456f10a12
13 changed files with 153 additions and 447 deletions

View File

@@ -1,6 +1,6 @@
# MIT License
# Copyright (c) 2017 Cristian Adam
# Copyright (c) 2017-2018 Cristian Adam
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -20,15 +20,14 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
cmake_minimum_required(VERSION 3.4.3)
include_guard(GLOBAL)
set(cache_file ${CMAKE_CHECKS_CACHE_FILE})
if(NOT cache_file)
set(cache_file ${CMAKE_BINARY_DIR}/cmake_checks_cache.txt)
endif()
cmake_minimum_required(VERSION 3.11)
include(DumpCMakeVariables)
include(${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
macro(check_library_exists library function location variable)
_check_library_exists(${library} ${function} "${location}" ${variable})
file(APPEND ${cache_file} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Have library ${library}\")\n")
_check_library_exists("${library}" ${function} "${location}" ${variable})
file(APPEND ${CMAKE_BINARY_DIR}/cmake_checks_cache.txt "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Have library ${library}\")\n")
endmacro()