diff options
-rw-r--r-- | Modules/CheckCCompilerFlag.cmake | 1 | ||||
-rw-r--r-- | Modules/CheckCSourceCompiles.cmake | 1 | ||||
-rw-r--r-- | Modules/CheckCSourceRuns.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckCXXCompilerFlag.cmake | 1 | ||||
-rw-r--r-- | Modules/CheckCXXSourceCompiles.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckCXXSourceRuns.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckCXXSymbolExists.cmake | 1 | ||||
-rw-r--r-- | Modules/CheckFortranCompilerFlag.cmake | 1 | ||||
-rw-r--r-- | Modules/CheckFortranFunctionExists.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckFortranSourceCompiles.cmake | 1 | ||||
-rw-r--r-- | Modules/CheckFunctionExists.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckIncludeFile.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckIncludeFileCXX.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckIncludeFiles.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckLanguage.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckLibraryExists.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckPrototypeDefinition.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckStructHasMember.cmake | 1 | ||||
-rw-r--r-- | Modules/CheckSymbolExists.cmake | 2 | ||||
-rw-r--r-- | Modules/CheckTypeSize.cmake | 6 | ||||
-rw-r--r-- | Modules/CheckVariableExists.cmake | 2 |
21 files changed, 36 insertions, 3 deletions
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake index 5a7298b..9d2c74d 100644 --- a/Modules/CheckCCompilerFlag.cmake +++ b/Modules/CheckCCompilerFlag.cmake @@ -32,6 +32,7 @@ effect or even a specific one is beyond the scope of this module. in such variables may cause a false negative for this check. #]=======================================================================] +include_guard(GLOBAL) include(CheckCSourceCompiles) include(CMakeCheckCompilerFlagCommonPatterns) diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake index 56e68d5..114213a 100644 --- a/Modules/CheckCSourceCompiles.cmake +++ b/Modules/CheckCSourceCompiles.cmake @@ -60,6 +60,7 @@ Check if given C source compiles and links into an executable. #]=======================================================================] +include_guard(GLOBAL) macro(CHECK_C_SOURCE_COMPILES SOURCE VAR) if(NOT DEFINED "${VAR}") diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake index 8da9f1e..fa51346 100644 --- a/Modules/CheckCSourceRuns.cmake +++ b/Modules/CheckCSourceRuns.cmake @@ -60,6 +60,8 @@ subsequently be run. #]=======================================================================] +include_guard(GLOBAL) + macro(CHECK_C_SOURCE_RUNS SOURCE VAR) if(NOT DEFINED "${VAR}") set(MACRO_CHECK_FUNCTION_DEFINITIONS diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake index f731b70..dd60835 100644 --- a/Modules/CheckCXXCompilerFlag.cmake +++ b/Modules/CheckCXXCompilerFlag.cmake @@ -32,6 +32,7 @@ effect or even a specific one is beyond the scope of this module. in such variables may cause a false negative for this check. #]=======================================================================] +include_guard(GLOBAL) include(CheckCXXSourceCompiles) include(CMakeCheckCompilerFlagCommonPatterns) diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake index 4634a7b..ed8661b 100644 --- a/Modules/CheckCXXSourceCompiles.cmake +++ b/Modules/CheckCXXSourceCompiles.cmake @@ -60,6 +60,8 @@ Check if given C++ source compiles and links into an executable. #]=======================================================================] +include_guard(GLOBAL) + macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR) if(NOT DEFINED "${VAR}") set(_FAIL_REGEX) diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake index 558708c..83bf2f2 100644 --- a/Modules/CheckCXXSourceRuns.cmake +++ b/Modules/CheckCXXSourceRuns.cmake @@ -60,6 +60,8 @@ subsequently be run. #]=======================================================================] +include_guard(GLOBAL) + macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR) if(NOT DEFINED "${VAR}") set(MACRO_CHECK_FUNCTION_DEFINITIONS diff --git a/Modules/CheckCXXSymbolExists.cmake b/Modules/CheckCXXSymbolExists.cmake index 8552154..117a458 100644 --- a/Modules/CheckCXXSymbolExists.cmake +++ b/Modules/CheckCXXSymbolExists.cmake @@ -32,6 +32,7 @@ # CMAKE_REQUIRED_LIBRARIES = list of libraries to link # CMAKE_REQUIRED_QUIET = execute quietly without messages +include_guard(GLOBAL) include(CheckSymbolExists) macro(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VARIABLE) diff --git a/Modules/CheckFortranCompilerFlag.cmake b/Modules/CheckFortranCompilerFlag.cmake index 8a1a8b9..2cb2532 100644 --- a/Modules/CheckFortranCompilerFlag.cmake +++ b/Modules/CheckFortranCompilerFlag.cmake @@ -32,6 +32,7 @@ effect or even a specific one is beyond the scope of this module. in such variables may cause a false negative for this check. #]=======================================================================] +include_guard(GLOBAL) include(CheckFortranSourceCompiles) include(CMakeCheckCompilerFlagCommonPatterns) diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake index 5fc740a..f3ced93 100644 --- a/Modules/CheckFortranFunctionExists.cmake +++ b/Modules/CheckFortranFunctionExists.cmake @@ -24,6 +24,8 @@ # # CMAKE_REQUIRED_LIBRARIES = list of libraries to link +include_guard(GLOBAL) + macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE) if(NOT DEFINED ${VARIABLE}) message(STATUS "Looking for Fortran ${FUNCTION}") diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake index 4df17e3..d2b0cca 100644 --- a/Modules/CheckFortranSourceCompiles.cmake +++ b/Modules/CheckFortranSourceCompiles.cmake @@ -66,6 +66,7 @@ Check if given Fortran source compiles and links into an executable. #]=======================================================================] +include_guard(GLOBAL) macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR) if(NOT DEFINED "${VAR}") diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake index ef08062..d00aa8a 100644 --- a/Modules/CheckFunctionExists.cmake +++ b/Modules/CheckFunctionExists.cmake @@ -38,6 +38,8 @@ # * ``check_function_exists()`` only verifies linking, it does not verify # that the function is declared in system headers. +include_guard(GLOBAL) + macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE) if(NOT DEFINED "${VARIABLE}" OR "x${${VARIABLE}}" STREQUAL "x${VARIABLE}") set(MACRO_CHECK_FUNCTION_DEFINITIONS diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake index c566e14..e5554c4 100644 --- a/Modules/CheckIncludeFile.cmake +++ b/Modules/CheckIncludeFile.cmake @@ -34,6 +34,8 @@ # at once. See the :module:`CheckIncludeFileCXX` module to check for headers # using the ``CXX`` language. +include_guard(GLOBAL) + macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE) if(NOT DEFINED "${VARIABLE}") if(CMAKE_REQUIRED_INCLUDES) diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index 19b1ef6..7948bab 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -33,6 +33,8 @@ # See modules :module:`CheckIncludeFile` and :module:`CheckIncludeFiles` # to check for one or more ``C`` headers. +include_guard(GLOBAL) + macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) if(NOT DEFINED "${VARIABLE}" OR "x${${VARIABLE}}" STREQUAL "x${VARIABLE}") if(CMAKE_REQUIRED_INCLUDES) diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index bef11a5..56b7e32 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -34,6 +34,8 @@ # See modules :module:`CheckIncludeFile` and :module:`CheckIncludeFileCXX` # to check for a single header file in ``C`` or ``CXX`` languages. +include_guard(GLOBAL) + macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE) if(NOT DEFINED "${VARIABLE}") set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n") diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake index 70c14d7..ce92bfe 100644 --- a/Modules/CheckLanguage.cmake +++ b/Modules/CheckLanguage.cmake @@ -31,6 +31,8 @@ # message(STATUS "No Fortran support") # endif() +include_guard(GLOBAL) + macro(check_language lang) if(NOT DEFINED CMAKE_${lang}_COMPILER) set(_desc "Looking for a ${lang} compiler") diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake index 528a450..487cc59 100644 --- a/Modules/CheckLibraryExists.cmake +++ b/Modules/CheckLibraryExists.cmake @@ -29,6 +29,8 @@ # CMAKE_REQUIRED_LIBRARIES = list of libraries to link # CMAKE_REQUIRED_QUIET = execute quietly without messages +include_guard(GLOBAL) + macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) if(NOT DEFINED "${VARIABLE}") set(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake index 7859594..ceb4d88 100644 --- a/Modules/CheckPrototypeDefinition.cmake +++ b/Modules/CheckPrototypeDefinition.cmake @@ -41,9 +41,9 @@ # - get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) +include_guard(GLOBAL) function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE) diff --git a/Modules/CheckStructHasMember.cmake b/Modules/CheckStructHasMember.cmake index 085b464..8689a5c 100644 --- a/Modules/CheckStructHasMember.cmake +++ b/Modules/CheckStructHasMember.cmake @@ -38,6 +38,7 @@ # Example: CHECK_STRUCT_HAS_MEMBER("struct timeval" tv_sec sys/select.h # HAVE_TIMEVAL_TV_SEC LANGUAGE C) +include_guard(GLOBAL) include(CheckCSourceCompiles) include(CheckCXXSourceCompiles) diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index 6d52d56..d9c9ae4 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -43,6 +43,8 @@ the way the check is run: execute quietly without messages #]=======================================================================] +include_guard(GLOBAL) + macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE) if(CMAKE_C_COMPILER_LOADED) __CHECK_SYMBOL_EXISTS_IMPL("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" "${SYMBOL}" "${FILES}" "${VARIABLE}" ) diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index fcf1df7..2b5deec 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -71,11 +71,13 @@ include(CheckIncludeFile) include(CheckIncludeFileCXX) +get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) + +include_guard(GLOBAL) + cmake_policy(PUSH) cmake_policy(SET CMP0054 NEW) -get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) - #----------------------------------------------------------------------------- # Helper function. DO NOT CALL DIRECTLY. function(__check_type_size_impl type var map builtin language) diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake index fd5c36c..ab456d1 100644 --- a/Modules/CheckVariableExists.cmake +++ b/Modules/CheckVariableExists.cmake @@ -32,6 +32,8 @@ # CMAKE_REQUIRED_LIBRARIES = list of libraries to link # CMAKE_REQUIRED_QUIET = execute quietly without messages +include_guard(GLOBAL) + macro(CHECK_VARIABLE_EXISTS VAR VARIABLE) if(NOT DEFINED "${VARIABLE}") set(MACRO_CHECK_VARIABLE_DEFINITIONS |