summaryrefslogtreecommitdiff
path: root/share/cmake-3.6/Modules/CheckCCompilerFlag.cmake
diff options
context:
space:
mode:
authorAlexander Dorokhine <adorokhine@google.com>2020-02-19 14:28:39 -0800
committerAlexander Dorokhine <adorokhine@google.com>2020-02-19 14:28:39 -0800
commit7b4dc2fe14068921358ad685dea0d59c5a58e1fc (patch)
tree7a3c3db6a9f4739eac3bbb304ec5ae2276b5f5b2 /share/cmake-3.6/Modules/CheckCCompilerFlag.cmake
parent7e873cc0f67317e1b37ff2fae5aa6e0c4406bb13 (diff)
downloadlinux-x86-7b4dc2fe14068921358ad685dea0d59c5a58e1fc.tar.gz
Upgrade cmake to 3.10.2cmake-master-dev
From http://go/ab/5078762 Bug: 149853706 Change-Id: Ibed49ca8ac685da3bc5c02fef640c478dad1dcf9 (cherry picked from commit 40dcb6f55bd2e8731e3e4f1a1721f7ff0fb83cb1)
Diffstat (limited to 'share/cmake-3.6/Modules/CheckCCompilerFlag.cmake')
-rw-r--r--share/cmake-3.6/Modules/CheckCCompilerFlag.cmake64
1 files changed, 0 insertions, 64 deletions
diff --git a/share/cmake-3.6/Modules/CheckCCompilerFlag.cmake b/share/cmake-3.6/Modules/CheckCCompilerFlag.cmake
deleted file mode 100644
index 53f3454..0000000
--- a/share/cmake-3.6/Modules/CheckCCompilerFlag.cmake
+++ /dev/null
@@ -1,64 +0,0 @@
-#.rst:
-# CheckCCompilerFlag
-# ------------------
-#
-# Check whether the C compiler supports a given flag.
-#
-# CHECK_C_COMPILER_FLAG(<flag> <var>)
-#
-# ::
-#
-# <flag> - the compiler flag
-# <var> - 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 <flag>. See help for
-# CheckCSourceCompiles for a listing of variables that can otherwise
-# modify the build. The result only tells that the compiler does not
-# give an error message when it encounters the flag. If the flag has
-# any effect or even a specific one is beyond the scope of this module.
-
-#=============================================================================
-# Copyright 2006-2011 Kitware, Inc.
-# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
-# Copyright 2011 Matthias Kretz <kretz@kde.org>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-include(CheckCSourceCompiles)
-include(CMakeCheckCompilerFlagCommonPatterns)
-
-macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
- set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
- set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
-
- # Normalize locale during test compilation.
- set(_CheckCCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG)
- foreach(v ${_CheckCCompilerFlag_LOCALE_VARS})
- set(_CheckCCompilerFlag_SAVED_${v} "$ENV{${v}}")
- set(ENV{${v}} C)
- endforeach()
- CHECK_COMPILER_FLAG_COMMON_PATTERNS(_CheckCCompilerFlag_COMMON_PATTERNS)
- CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT}
- # Some compilers do not fail with a bad flag
- FAIL_REGEX "command line option .* is valid for .* but not for C" # GNU
- ${_CheckCCompilerFlag_COMMON_PATTERNS}
- )
- foreach(v ${_CheckCCompilerFlag_LOCALE_VARS})
- set(ENV{${v}} ${_CheckCCompilerFlag_SAVED_${v}})
- unset(_CheckCCompilerFlag_SAVED_${v})
- endforeach()
- unset(_CheckCCompilerFlag_LOCALE_VARS)
- unset(_CheckCCompilerFlag_COMMON_PATTERNS)
-
- set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
-endmacro ()