Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Cristian Adam
CMake
Commits
4d611868
Commit
4d611868
authored
Sep 29, 2017
by
Cristian Adam
💬
Browse files
Check*: Added include guards
parent
65f21a7e
Pipeline
#83165
passed with stage
Changes
21
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Modules/CheckCCompilerFlag.cmake
View file @
4d611868
...
...
@@ -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
)
...
...
Modules/CheckCSourceCompiles.cmake
View file @
4d611868
...
...
@@ -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
}
"
)
...
...
Modules/CheckCSourceRuns.cmake
View file @
4d611868
...
...
@@ -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
...
...
Modules/CheckCXXCompilerFlag.cmake
View file @
4d611868
...
...
@@ -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
)
...
...
Modules/CheckCXXSourceCompiles.cmake
View file @
4d611868
...
...
@@ -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
)
...
...
Modules/CheckCXXSourceRuns.cmake
View file @
4d611868
...
...
@@ -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
...
...
Modules/CheckCXXSymbolExists.cmake
View file @
4d611868
...
...
@@ -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
)
...
...
Modules/CheckFortranCompilerFlag.cmake
View file @
4d611868
...
...
@@ -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
)
...
...
Modules/CheckFortranFunctionExists.cmake
View file @
4d611868
...
...
@@ -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
}
"
)
...
...
Modules/CheckFortranSourceCompiles.cmake
View file @
4d611868
...
...
@@ -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
}
"
)
...
...
Modules/CheckFunctionExists.cmake
View file @
4d611868
...
...
@@ -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
...
...
Modules/CheckIncludeFile.cmake
View file @
4d611868
...
...
@@ -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
)
...
...
Modules/CheckIncludeFileCXX.cmake
View file @
4d611868
...
...
@@ -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
)
...
...
Modules/CheckIncludeFiles.cmake
View file @
4d611868
...
...
@@ -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
"
)
...
...
Modules/CheckLanguage.cmake
View file @
4d611868
...
...
@@ -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"
)
...
...
Modules/CheckLibraryExists.cmake
View file @
4d611868
...
...
@@ -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
...
...
Modules/CheckPrototypeDefinition.cmake
View file @
4d611868
...
...
@@ -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
)
...
...
Modules/CheckStructHasMember.cmake
View file @
4d611868
...
...
@@ -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
)
...
...
Modules/CheckSymbolExists.cmake
View file @
4d611868
...
...
@@ -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
}
"
)
...
...
Modules/CheckTypeSize.cmake
View file @
4d611868
...
...
@@ -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
)
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment