mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
CMake: Remove IS(_NOT)_DEBUG_BUILD
This commit is contained in:
parent
68f1083dbf
commit
36e06236a9
@ -53,14 +53,6 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Provide convenient boolean expression based on build type
|
# Provide convenient boolean expression based on build type
|
||||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
|
||||||
set(IS_DEBUG_BUILD True)
|
|
||||||
set(IS_NOT_DEBUG_BUILD False)
|
|
||||||
else()
|
|
||||||
set(IS_DEBUG_BUILD False)
|
|
||||||
set(IS_NOT_DEBUG_BUILD True)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE MATCHES "MinSizeRel")
|
if(CMAKE_BUILD_TYPE MATCHES "MinSizeRel")
|
||||||
set(IS_MINSIZE_BUILD True)
|
set(IS_MINSIZE_BUILD True)
|
||||||
set(IS_NOT_MINSIZE_BUILD False)
|
set(IS_NOT_MINSIZE_BUILD False)
|
||||||
@ -299,7 +291,7 @@ option(DO_MEMORY_USAGE
|
|||||||
enables you to define the variable 'track-memory-usage' at runtime
|
enables you to define the variable 'track-memory-usage' at runtime
|
||||||
to help track memory leaks, and also report total memory usage on
|
to help track memory leaks, and also report total memory usage on
|
||||||
PStats. There is some small overhead for having this ability
|
PStats. There is some small overhead for having this ability
|
||||||
available, even if it is unused." ${IS_DEBUG_BUILD})
|
available, even if it is unused." OFF)
|
||||||
list(APPEND PER_CONFIG_OPTIONS DO_MEMORY_USAGE)
|
list(APPEND PER_CONFIG_OPTIONS DO_MEMORY_USAGE)
|
||||||
set(DO_MEMORY_USAGE_Debug ON CACHE BOOL "")
|
set(DO_MEMORY_USAGE_Debug ON CACHE BOOL "")
|
||||||
|
|
||||||
@ -307,7 +299,7 @@ option(SIMULATE_NETWORK_DELAY
|
|||||||
"This option compiles in support for simulating network delay via
|
"This option compiles in support for simulating network delay via
|
||||||
the min-lag and max-lag prc variables. It adds a tiny bit of
|
the min-lag and max-lag prc variables. It adds a tiny bit of
|
||||||
overhead even when it is not activated, so it is typically enabled
|
overhead even when it is not activated, so it is typically enabled
|
||||||
only in a development build." ${IS_DEBUG_BUILD})
|
only in a development build." OFF)
|
||||||
list(APPEND PER_CONFIG_OPTIONS SIMULATE_NETWORK_DELAY)
|
list(APPEND PER_CONFIG_OPTIONS SIMULATE_NETWORK_DELAY)
|
||||||
set(SIMULATE_NETWORK_DELAY_Debug ON CACHE BOOL "")
|
set(SIMULATE_NETWORK_DELAY_Debug ON CACHE BOOL "")
|
||||||
|
|
||||||
@ -317,14 +309,14 @@ rendering. Since this is normally useful only for researching
|
|||||||
buggy drivers, and since there is a tiny bit of per-primitive
|
buggy drivers, and since there is a tiny bit of per-primitive
|
||||||
overhead to have this option available even if it is unused, it is
|
overhead to have this option available even if it is unused, it is
|
||||||
by default enabled only in a development build. This has no effect
|
by default enabled only in a development build. This has no effect
|
||||||
on DirectX rendering." ${IS_DEBUG_BUILD})
|
on DirectX rendering." OFF)
|
||||||
list(APPEND PER_CONFIG_OPTIONS SUPPORT_IMMEDIATE_MODE)
|
list(APPEND PER_CONFIG_OPTIONS SUPPORT_IMMEDIATE_MODE)
|
||||||
set(SUPPORT_IMMEDIATE_MODE_Debug ON CACHE BOOL "")
|
set(SUPPORT_IMMEDIATE_MODE_Debug ON CACHE BOOL "")
|
||||||
|
|
||||||
option(NOTIFY_DEBUG
|
option(NOTIFY_DEBUG
|
||||||
"Do you want to include the 'debug' and 'spam' Notify messages?
|
"Do you want to include the 'debug' and 'spam' Notify messages?
|
||||||
Normally, these are stripped out when we build for release, but sometimes it's
|
Normally, these are stripped out when we build for release, but sometimes it's
|
||||||
useful to keep them around. Turn this setting on to achieve that." ${IS_DEBUG_BUILD})
|
useful to keep them around. Turn this setting on to achieve that." OFF)
|
||||||
list(APPEND PER_CONFIG_OPTIONS NOTIFY_DEBUG)
|
list(APPEND PER_CONFIG_OPTIONS NOTIFY_DEBUG)
|
||||||
set(NOTIFY_DEBUG_Debug ON CACHE BOOL "")
|
set(NOTIFY_DEBUG_Debug ON CACHE BOOL "")
|
||||||
|
|
||||||
@ -414,10 +406,9 @@ mark_as_advanced(ANDROID_NDK_HOME ANDROID_ABI ANDROID_STL
|
|||||||
|
|
||||||
# By default, we'll assume the user only wants to run with Debug
|
# By default, we'll assume the user only wants to run with Debug
|
||||||
# python if he has to--that is, on Windows when building a debug build.
|
# python if he has to--that is, on Windows when building a debug build.
|
||||||
if(WIN32 AND IS_DEBUG_BUILD)
|
set(USE_DEBUG_PYTHON OFF)
|
||||||
set(USE_DEBUG_PYTHON ON)
|
if(WIN32)
|
||||||
else()
|
set(USE_DEBUG_PYTHON_Debug ON)
|
||||||
set(USE_DEBUG_PYTHON OFF)
|
|
||||||
endif()
|
endif()
|
||||||
list(APPEND PER_CONFIG_OPTIONS USE_DEBUG_PYTHON)
|
list(APPEND PER_CONFIG_OPTIONS USE_DEBUG_PYTHON)
|
||||||
|
|
||||||
@ -574,7 +565,7 @@ slightly slow down Panda for the single CPU case."
|
|||||||
IMPORTED_AS Threads::Threads)
|
IMPORTED_AS Threads::Threads)
|
||||||
|
|
||||||
# Configure debug threads
|
# Configure debug threads
|
||||||
option(DEBUG_THREADS "If on, enables debugging of thread and sync operations (i.e. mutexes, deadlocks)" ${IS_DEBUG_BUILD})
|
option(DEBUG_THREADS "If on, enables debugging of thread and sync operations (i.e. mutexes, deadlocks)" OFF)
|
||||||
list(APPEND PER_CONFIG_OPTIONS DEBUG_THREADS)
|
list(APPEND PER_CONFIG_OPTIONS DEBUG_THREADS)
|
||||||
set(DEBUG_THREADS_Debug ON CACHE BOOL "")
|
set(DEBUG_THREADS_Debug ON CACHE BOOL "")
|
||||||
|
|
||||||
|
@ -326,13 +326,10 @@ package_option(OpenSSL
|
|||||||
|
|
||||||
option(REPORT_OPENSSL_ERRORS
|
option(REPORT_OPENSSL_ERRORS
|
||||||
"Define this true to include the OpenSSL code to report verbose
|
"Define this true to include the OpenSSL code to report verbose
|
||||||
error messages when they occur." ${IS_DEBUG_BUILD})
|
error messages when they occur." OFF)
|
||||||
|
option(REPORT_OPENSSL_ERRORS_Debug "" ON)
|
||||||
|
|
||||||
if(REPORT_OPENSSL_ERRORS)
|
package_status(OpenSSL "OpenSSL")
|
||||||
package_status(OpenSSL "OpenSSL" "with verbose error reporting")
|
|
||||||
else()
|
|
||||||
package_status(OpenSSL "OpenSSL")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# zlib
|
# zlib
|
||||||
find_package(ZLIB QUIET)
|
find_package(ZLIB QUIET)
|
||||||
|
@ -149,6 +149,9 @@ target_interrogate(p3express ALL EXTENSIONS ${P3EXPRESS_IGATEEXT})
|
|||||||
if(REPORT_OPENSSL_ERRORS)
|
if(REPORT_OPENSSL_ERRORS)
|
||||||
target_compile_definitions(p3express PRIVATE REPORT_OPENSSL_ERRORS)
|
target_compile_definitions(p3express PRIVATE REPORT_OPENSSL_ERRORS)
|
||||||
endif()
|
endif()
|
||||||
|
if(REPORT_OPENSSL_ERRORS_Debug)
|
||||||
|
target_compile_definitions(p3express PRIVATE $<$<CONFIG:Debug>:REPORT_OPENSSL_ERRORS>)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(GETTIMEOFDAY_ONE_PARAM)
|
if(GETTIMEOFDAY_ONE_PARAM)
|
||||||
target_compile_definitions(p3express PRIVATE GETTIMEOFDAY_ONE_PARAM)
|
target_compile_definitions(p3express PRIVATE GETTIMEOFDAY_ONE_PARAM)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user