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.
This commit is contained in:
@@ -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}"
|
||||
)
|
||||
|
Reference in New Issue
Block a user