diff options
| author | Brad King <brad.king@kitware.com> | 2015-07-09 13:17:19 (GMT) |
|---|---|---|
| committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-07-09 13:17:19 (GMT) |
| commit | 3723fe94e6ec01143ec91433deb5741efe10cfe2 (patch) | |
| tree | d6d06306f2eb6874d4f4b68b2f12647cecc2a227 /Modules/CheckCCompilerFlag.cmake | |
| parent | 6b4fccd1a69b7da0cadb50026d3a5056c5fc0b05 (diff) | |
| parent | a639689c16039b2f7c8b63e31fbbbc753ccef8c8 (diff) | |
| download | CMake-3723fe94e6ec01143ec91433deb5741efe10cfe2.zip CMake-3723fe94e6ec01143ec91433deb5741efe10cfe2.tar.gz CMake-3723fe94e6ec01143ec91433deb5741efe10cfe2.tar.bz2 | |
Merge topic 'CheckCompilerFlag-do-not-use-FLAGS'
a639689c Check*CompilerFlag: Revert to previous method used to pass flags (#15641)
Diffstat (limited to 'Modules/CheckCCompilerFlag.cmake')
| -rw-r--r-- | Modules/CheckCCompilerFlag.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake index 750e4fb..53f3454 100644 --- a/Modules/CheckCCompilerFlag.cmake +++ b/Modules/CheckCCompilerFlag.cmake @@ -13,7 +13,7 @@ # Will be created as an internal cache variable. # # This internally calls the check_c_source_compiles macro and sets -# CMAKE_REQUIRED_FLAGS to <flag>. See help for +# 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 @@ -38,8 +38,8 @@ include(CheckCSourceCompiles) include(CMakeCheckCompilerFlagCommonPatterns) macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT) - set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") - set(CMAKE_REQUIRED_FLAGS "${_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) @@ -60,5 +60,5 @@ macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT) unset(_CheckCCompilerFlag_LOCALE_VARS) unset(_CheckCCompilerFlag_COMMON_PATTERNS) - set (CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}") + set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") endmacro () |
