From 908c74399a737d878e18823e00730964896d1184 Mon Sep 17 00:00:00 2001 From: Sebastian Leske Date: Wed, 10 Sep 2014 08:35:49 +0200 Subject: [PATCH] Help: Document that the CHECK_* macros create cache variables Otherwise callers may expect to be able to re-use result variables. --- Modules/CheckCCompilerFlag.cmake | 1 + Modules/CheckCSourceCompiles.cmake | 1 + Modules/CheckCSourceRuns.cmake | 1 + Modules/CheckCXXSourceCompiles.cmake | 1 + Modules/CheckCXXSourceRuns.cmake | 1 + Modules/CheckFortranFunctionExists.cmake | 1 + Modules/CheckFortranSourceCompiles.cmake | 1 + Modules/CheckFunctionExists.cmake | 1 + Modules/CheckIncludeFile.cmake | 1 + Modules/CheckIncludeFileCXX.cmake | 1 + Modules/CheckIncludeFiles.cmake | 1 + Modules/CheckLibraryExists.cmake | 1 + Modules/CheckPrototypeDefinition.cmake | 1 + Modules/CheckSymbolExists.cmake | 1 + Modules/CheckTypeSize.cmake | 3 +++ Modules/CheckVariableExists.cmake | 2 +- 16 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake index efdac2008..53f345473 100644 --- a/Modules/CheckCCompilerFlag.cmake +++ b/Modules/CheckCCompilerFlag.cmake @@ -10,6 +10,7 @@ # # - the compiler flag # - variable to store the result +# Will be created as an internal cache variable. # # This internally calls the check_c_source_compiles macro and sets # CMAKE_REQUIRED_DEFINITIONS to . See help for diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake index 752344672..6e80fb535 100644 --- a/Modules/CheckCSourceCompiles.cmake +++ b/Modules/CheckCSourceCompiles.cmake @@ -10,6 +10,7 @@ # # - source code to try to compile, must define 'main' # - variable to store whether the source code compiled +# Will be created as an internal cache variable. # - fail if test output matches this regex # # The following variables may be set before calling this macro to modify diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake index 0fb0f23c0..0ce423c1f 100644 --- a/Modules/CheckCSourceRuns.cmake +++ b/Modules/CheckCSourceRuns.cmake @@ -11,6 +11,7 @@ # - source code to try to compile # - variable to store the result # (1 for success, empty for failure) +# Will be created as an internal cache variable. # # The following variables may be set before calling this macro to modify # the way the check is run: diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake index edd62a6d4..6d52ec6b8 100644 --- a/Modules/CheckCXXSourceCompiles.cmake +++ b/Modules/CheckCXXSourceCompiles.cmake @@ -10,6 +10,7 @@ # # - source code to try to compile, must define 'main' # - variable to store whether the source code compiled +# Will be created as an internal cache variable. # - fail if test output matches this regex # # The following variables may be set before calling this macro to modify diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake index 02731f858..3c06d7540 100644 --- a/Modules/CheckCXXSourceRuns.cmake +++ b/Modules/CheckCXXSourceRuns.cmake @@ -11,6 +11,7 @@ # - source code to try to compile # - variable to store the result # (1 for success, empty for failure) +# Will be created as an internal cache variable. # # The following variables may be set before calling this macro to modify # the way the check is run: diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake index 0b1228909..bd52f61b6 100644 --- a/Modules/CheckFortranFunctionExists.cmake +++ b/Modules/CheckFortranFunctionExists.cmake @@ -10,6 +10,7 @@ # # FUNCTION - the name of the Fortran function # VARIABLE - variable to store the result +# Will be created as an internal cache variable. # # # diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake index 63e453902..f90d05bd6 100644 --- a/Modules/CheckFortranSourceCompiles.cmake +++ b/Modules/CheckFortranSourceCompiles.cmake @@ -12,6 +12,7 @@ # Source code to try to compile. It must define a PROGRAM entry point. # ```` # Variable to store whether the source code compiled. +# Will be created as an internal cache variable. # ```` # Fail if test output matches this regex. # diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake index 4c4334ff8..d277c3282 100644 --- a/Modules/CheckFunctionExists.cmake +++ b/Modules/CheckFunctionExists.cmake @@ -10,6 +10,7 @@ # store the result in a . This does not verify that any # system header file declares the function, only that it can be found at # link time (consider using CheckSymbolExists). +# will be created as an internal cache variable. # # The following variables may be set before calling this macro to modify # the way the check is run: diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake index c217bd469..402b37c6a 100644 --- a/Modules/CheckIncludeFile.cmake +++ b/Modules/CheckIncludeFile.cmake @@ -10,6 +10,7 @@ # # INCLUDE - name of include file # VARIABLE - variable to return result +# Will be created as an internal cache variable. # # # diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index eff982cc1..eae1730fb 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -14,6 +14,7 @@ # # INCLUDE - name of include file # VARIABLE - variable to return result +# Will be created as an internal cache variable. # # # diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index f8378c0e0..249486245 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -12,6 +12,7 @@ # # INCLUDE - list of files to include # VARIABLE - variable to return result +# Will be created as an internal cache variable. # # # diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake index fac5dd160..95c595a21 100644 --- a/Modules/CheckLibraryExists.cmake +++ b/Modules/CheckLibraryExists.cmake @@ -12,6 +12,7 @@ # FUNCTION - the name of the function # LOCATION - location where the library should be found # VARIABLE - variable to store the result +# Will be created as an internal cache variable. # # # diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake index fe000744c..dfa54d8ec 100644 --- a/Modules/CheckPrototypeDefinition.cmake +++ b/Modules/CheckPrototypeDefinition.cmake @@ -13,6 +13,7 @@ # RETURN - The return value of the function. # HEADER - The header files required. # VARIABLE - The variable to store the result. +# Will be created as an internal cache variable. # # Example: # diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index c31f6b6e3..79c5ba78e 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -9,6 +9,7 @@ # Check that the is available after including given header # and store the result in a . Specify the list of # files in one argument as a semicolon-separated list. +# will be created as an internal cache variable. # # If the header files define the symbol as a macro it is considered # available and assumed to work. If the header files declare the symbol diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index 8ce6b88c5..73ad86ebb 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -19,6 +19,9 @@ # "0" = type has arch-dependent size (see below) # "" = type does not exist # +# Both ``HAVE_${VARIABLE}`` and ``${VARIABLE}`` will be created as internal +# cache variables. +# # Furthermore, the variable "${VARIABLE}_CODE" holds C preprocessor code # to define the macro "${VARIABLE}" to the size of the type, or leave # the macro undefined if the type does not exist. diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake index 9e8e98414..f3e05e41b 100644 --- a/Modules/CheckVariableExists.cmake +++ b/Modules/CheckVariableExists.cmake @@ -14,7 +14,7 @@ # # VAR - the name of the variable # VARIABLE - variable to store the result -# +# Will be created as an internal cache variable. # # # This macro is only for C variables.