diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-17 14:38:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-17 14:38:02 +0300 |
commit | 0927ad8f4cafdc32981eda669cc9d6679cea36a3 (patch) | |
tree | 7a29ad702bae04a2672215c7030ce7ac6340b729 | |
parent | 8cbdf89695c54fb63e9f1f94201469de909962c4 (diff) |
CMake: remove workaround for cmake 2.8.3 problem testing -Werror=strict-prototypes flag (now 2.8.4 is out).
This is harmless, CMake 2.8.3 just wont build with -Werror=strict-prototypes which is nice for picky devs.
-rw-r--r-- | build_files/cmake/macros.cmake | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 6fd9fda152b..68a3510116c 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -299,32 +299,14 @@ macro(remove_strict_flags) endmacro() - -# XXX, until cmake 2.8.4 is released. -INCLUDE(CheckCSourceCompiles) -MACRO (CHECK_C_COMPILER_FLAG__INTERNAL _FLAG _RESULT) - SET(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") - SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") - CHECK_C_SOURCE_COMPILES("int main(void) { return 0;}" ${_RESULT} - # Some compilers do not fail with a bad flag - FAIL_REGEX "unrecognized .*option" # GNU - FAIL_REGEX "ignoring unknown option" # MSVC - FAIL_REGEX "[Uu]nknown option" # HP - FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro - FAIL_REGEX "command option .* is not recognized" # XL - ) - SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") -ENDMACRO (CHECK_C_COMPILER_FLAG__INTERNAL) -# XXX, end duplicate code. - macro(ADD_CHECK_C_COMPILER_FLAG _CFLAGS _CACHE_VAR _FLAG) - # include(CheckCCompilerFlag) + include(CheckCCompilerFlag) - CHECK_C_COMPILER_FLAG__INTERNAL("${_FLAG}" "${_CACHE_VAR}") + CHECK_C_COMPILER_FLAG("${_FLAG}" "${_CACHE_VAR}") if(${_CACHE_VAR}) # message(STATUS "Using CFLAG: ${_FLAG}") set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}") |