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 /CMakeLists.txt | |
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 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 674e532ff2c..a87c3e2d96d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,6 +149,9 @@ mark_as_advanced(WITH_HEADLESS) option(WITH_AUDASPACE "Build with blenders audio library (only disable if you know what you're doing!)" ON) mark_as_advanced(WITH_AUDASPACE) +option(WITH_BOOL_COMPAT "Continue defining \"TRUE\" and \"FALSE\" until these can be replaced with \"true\" and \"false\" from stdbool.h" ON) +mark_as_advanced(WITH_BOOL_COMPAT) + # (unix defaults to OpenMP On) if((UNIX AND NOT APPLE) OR (MINGW)) @@ -264,7 +267,6 @@ mark_as_advanced(WITH_CXX_GUARDEDALLOC) option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" OFF) mark_as_advanced(WITH_ASSERT_ABORT) - if(APPLE) cmake_minimum_required(VERSION 2.8.8) cmake_policy(VERSION 2.8.8) @@ -423,6 +425,13 @@ endif() TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG) +TEST_STDBOOL_SUPPORT() +if(HAVE_STDBOOL_H) + add_definitions(-DHAVE_STDBOOL_H) +endif() +if(WITH_BOOL_COMPAT) + add_definitions(-DWITH_BOOL_COMPAT) +endif() #----------------------------------------------------------------------------- # Check for valid directories @@ -2137,3 +2146,8 @@ if(FIRST_RUN) message("${_config_msg}") endif() + +# debug +message( + STATUS "HAVE_STDBOOL_H = ${HAVE_STDBOOL_H}" +) |