diff options
author | Kitware Robot <kwrobot@kitware.com> | 2019-05-10 19:34:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-05-14 19:26:46 (GMT) |
commit | 932dcce1e63b98739ab547f2146a39310c2d0e1e (patch) | |
tree | 6802b7f96be03d8bfee2867c0f308307982d6ffc /Modules/CheckCCompilerFlag.cmake | |
parent | e2d0aea2c734c8c5028f3573082e75bd157dbe72 (diff) | |
download | CMake-932dcce1e63b98739ab547f2146a39310c2d0e1e.zip CMake-932dcce1e63b98739ab547f2146a39310c2d0e1e.tar.gz CMake-932dcce1e63b98739ab547f2146a39310c2d0e1e.tar.bz2 |
Modules: Consistently use 2 space indentation
Diffstat (limited to 'Modules/CheckCCompilerFlag.cmake')
-rw-r--r-- | Modules/CheckCCompilerFlag.cmake | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake index f5c1127..a3e2da3 100644 --- a/Modules/CheckCCompilerFlag.cmake +++ b/Modules/CheckCCompilerFlag.cmake @@ -37,27 +37,27 @@ include(CheckCSourceCompiles) include(CMakeCheckCompilerFlagCommonPatterns) macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT) - set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") - set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") + 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}") + 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 () |