diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-01 16:47:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-01 16:47:58 +0400 |
commit | 80ff313495ed739851dbd15d3e31506904503d5e (patch) | |
tree | 9a80a4983ccc829ac98bca931276b38c1acab961 /build_files/cmake/macros.cmake | |
parent | e4f65749f9c522476f646004c06556b0fc5c4b4d (diff) |
patch [#33331] Time To Start Moving To Stdbool
by Lawrence D'Oliveiro (ldo)
so BKE_utildefines.h allows use of C99's bool type and true/false.
currently scons wont try to use stdbool.h, and works as if its never found.
Diffstat (limited to 'build_files/cmake/macros.cmake')
-rw-r--r-- | build_files/cmake/macros.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index efa258aa9dc..4a4c0fe6d2d 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -441,6 +441,15 @@ macro(TEST_SSE_SUPPORT unset(CMAKE_REQUIRED_FLAGS) endmacro() +macro(TEST_STDBOOL_SUPPORT) + # This program will compile correctly if and only if + # this C compiler supports C99 stdbool. + check_c_source_runs(" + #include <stdbool.h> + int main(void) { return (int)false; }" + HAVE_STDBOOL_H) +endmacro() + # when we have warnings as errors applied globally this # needs to be removed for some external libs which we dont maintain. |