Skip to content

Commit 36e0623

Browse files
committed
CMake: Remove IS(_NOT)_DEBUG_BUILD
1 parent 68f1083 commit 36e0623

File tree

3 files changed

+14
-23
lines changed

3 files changed

+14
-23
lines changed

dtool/Config.cmake

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ else()
5353
endif()
5454

5555
# Provide convenient boolean expression based on build type
56-
if(CMAKE_BUILD_TYPE MATCHES "Debug")
57-
set(IS_DEBUG_BUILD True)
58-
set(IS_NOT_DEBUG_BUILD False)
59-
else()
60-
set(IS_DEBUG_BUILD False)
61-
set(IS_NOT_DEBUG_BUILD True)
62-
endif()
63-
6456
if(CMAKE_BUILD_TYPE MATCHES "MinSizeRel")
6557
set(IS_MINSIZE_BUILD True)
6658
set(IS_NOT_MINSIZE_BUILD False)
@@ -299,15 +291,15 @@ option(DO_MEMORY_USAGE
299291
enables you to define the variable 'track-memory-usage' at runtime
300292
to help track memory leaks, and also report total memory usage on
301293
PStats. There is some small overhead for having this ability
302-
available, even if it is unused." ${IS_DEBUG_BUILD})
294+
available, even if it is unused." OFF)
303295
list(APPEND PER_CONFIG_OPTIONS DO_MEMORY_USAGE)
304296
set(DO_MEMORY_USAGE_Debug ON CACHE BOOL "")
305297

306298
option(SIMULATE_NETWORK_DELAY
307299
"This option compiles in support for simulating network delay via
308300
the min-lag and max-lag prc variables. It adds a tiny bit of
309301
overhead even when it is not activated, so it is typically enabled
310-
only in a development build." ${IS_DEBUG_BUILD})
302+
only in a development build." OFF)
311303
list(APPEND PER_CONFIG_OPTIONS SIMULATE_NETWORK_DELAY)
312304
set(SIMULATE_NETWORK_DELAY_Debug ON CACHE BOOL "")
313305

@@ -317,14 +309,14 @@ rendering. Since this is normally useful only for researching
317309
buggy drivers, and since there is a tiny bit of per-primitive
318310
overhead to have this option available even if it is unused, it is
319311
by default enabled only in a development build. This has no effect
320-
on DirectX rendering." ${IS_DEBUG_BUILD})
312+
on DirectX rendering." OFF)
321313
list(APPEND PER_CONFIG_OPTIONS SUPPORT_IMMEDIATE_MODE)
322314
set(SUPPORT_IMMEDIATE_MODE_Debug ON CACHE BOOL "")
323315

324316
option(NOTIFY_DEBUG
325317
"Do you want to include the 'debug' and 'spam' Notify messages?
326318
Normally, these are stripped out when we build for release, but sometimes it's
327-
useful to keep them around. Turn this setting on to achieve that." ${IS_DEBUG_BUILD})
319+
useful to keep them around. Turn this setting on to achieve that." OFF)
328320
list(APPEND PER_CONFIG_OPTIONS NOTIFY_DEBUG)
329321
set(NOTIFY_DEBUG_Debug ON CACHE BOOL "")
330322

@@ -414,10 +406,9 @@ mark_as_advanced(ANDROID_NDK_HOME ANDROID_ABI ANDROID_STL
414406

415407
# By default, we'll assume the user only wants to run with Debug
416408
# python if he has to--that is, on Windows when building a debug build.
417-
if(WIN32 AND IS_DEBUG_BUILD)
418-
set(USE_DEBUG_PYTHON ON)
419-
else()
420-
set(USE_DEBUG_PYTHON OFF)
409+
set(USE_DEBUG_PYTHON OFF)
410+
if(WIN32)
411+
set(USE_DEBUG_PYTHON_Debug ON)
421412
endif()
422413
list(APPEND PER_CONFIG_OPTIONS USE_DEBUG_PYTHON)
423414

@@ -574,7 +565,7 @@ slightly slow down Panda for the single CPU case."
574565
IMPORTED_AS Threads::Threads)
575566

576567
# Configure debug threads
577-
option(DEBUG_THREADS "If on, enables debugging of thread and sync operations (i.e. mutexes, deadlocks)" ${IS_DEBUG_BUILD})
568+
option(DEBUG_THREADS "If on, enables debugging of thread and sync operations (i.e. mutexes, deadlocks)" OFF)
578569
list(APPEND PER_CONFIG_OPTIONS DEBUG_THREADS)
579570
set(DEBUG_THREADS_Debug ON CACHE BOOL "")
580571

dtool/Package.cmake

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,10 @@ package_option(OpenSSL
326326

327327
option(REPORT_OPENSSL_ERRORS
328328
"Define this true to include the OpenSSL code to report verbose
329-
error messages when they occur." ${IS_DEBUG_BUILD})
329+
error messages when they occur." OFF)
330+
option(REPORT_OPENSSL_ERRORS_Debug "" ON)
330331

331-
if(REPORT_OPENSSL_ERRORS)
332-
package_status(OpenSSL "OpenSSL" "with verbose error reporting")
333-
else()
334-
package_status(OpenSSL "OpenSSL")
335-
endif()
332+
package_status(OpenSSL "OpenSSL")
336333

337334
# zlib
338335
find_package(ZLIB QUIET)

panda/src/express/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ target_interrogate(p3express ALL EXTENSIONS ${P3EXPRESS_IGATEEXT})
149149
if(REPORT_OPENSSL_ERRORS)
150150
target_compile_definitions(p3express PRIVATE REPORT_OPENSSL_ERRORS)
151151
endif()
152+
if(REPORT_OPENSSL_ERRORS_Debug)
153+
target_compile_definitions(p3express PRIVATE $<$<CONFIG:Debug>:REPORT_OPENSSL_ERRORS>)
154+
endif()
152155

153156
if(GETTIMEOFDAY_ONE_PARAM)
154157
target_compile_definitions(p3express PRIVATE GETTIMEOFDAY_ONE_PARAM)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy