Use the CMAKE_CHECKS_CACHE_FILE variable, if present, to set the

location of the checks cache file. Use the default
BINARY_DIR/cmake_checks_cache.txt by default.
This commit is contained in:
Pedro Navarro
2018-12-19 14:03:33 -08:00
parent 272b977d54
commit f860440775
12 changed files with 21 additions and 19 deletions

View File

@@ -29,5 +29,5 @@ include(${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
macro(check_library_exists library function location variable)
_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")
file(APPEND ${CMAKE_CHECKS_CACHE_FILE} "set(${variable} \"${${variable}}\" CACHE INTERNAL \"Have library ${library}\")\n")
endmacro()