1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:37:44 +00:00

Everywhere: Use CMake to generate AK/Debug.h.

This was done with the help of several scripts, I dump them here to
easily find them later:

    awk '/#ifdef/ { print "#cmakedefine01 "$2 }' AK/Debug.h.in

    for debug_macro in $(awk '/#ifdef/ { print $2 }' AK/Debug.h.in)
    do
        find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/#ifdef '$debug_macro'/#if '$debug_macro'/' {} \;
    done

    # Remember to remove WRAPPER_GERNERATOR_DEBUG from the list.
    awk '/#cmake/ { print "set("$2" ON)" }' AK/Debug.h.in
This commit is contained in:
asynts 2021-01-23 23:29:11 +01:00 committed by Andreas Kling
parent 76f2918416
commit 1a3a0836c0
59 changed files with 475 additions and 459 deletions

View file

@ -1,178 +1,96 @@
add_compile_definitions("ACPI_DEBUG")
add_compile_definitions("APIC_DEBUG")
add_compile_definitions("APIC_SMP_DEBUG")
add_compile_definitions("ARP_DEBUG")
add_compile_definitions("AWAVLOADER_DEBUG")
add_compile_definitions("BBFS_DEBUG")
add_compile_definitions("BMP_DEBUG")
add_compile_definitions("BXVGA_DEBUG")
add_compile_definitions("CACHE_DEBUG")
add_compile_definitions("CALLBACK_MACHINE_DEBUG")
add_compile_definitions("CHTTPJOB_DEBUG")
add_compile_definitions("CNETWORKJOB_DEBUG")
add_compile_definitions("COMMIT_DEBUG")
add_compile_definitions("COMPOSE_DEBUG")
add_compile_definitions("CONTEXT_SWITCH_DEBUG")
add_compile_definitions("CONTIGUOUS_VMOBJECT_DEBUG")
add_compile_definitions("COPY_DEBUG")
add_compile_definitions("CRYPTO_DEBUG")
add_compile_definitions("CSOCKET_DEBUG")
add_compile_definitions("DEBUG_AUTOCOMPLETE")
add_compile_definitions("DEBUG_CPP_LANGUAGE_SERVER")
add_compile_definitions("DEBUG_CURSOR_TOOL")
add_compile_definitions("DEBUG_DIFF")
add_compile_definitions("DEBUG_FILE_CONTENT")
add_compile_definitions("DEBUG_GZIP")
add_compile_definitions("DEBUG_HIGHLIGHT_FOCUSED_FRAME")
add_compile_definitions("DEBUG_HUNKS")
add_compile_definitions("DEBUG_IO")
add_compile_definitions("DEBUG_ITEM_RECTS")
add_compile_definitions("DEBUG_LOCAL_SOCKET")
add_compile_definitions("DEBUG_MAPPED_FILE")
add_compile_definitions("DEBUG_MARKDOWN")
add_compile_definitions("DEBUG_MENUS")
add_compile_definitions("DEBUG_POLL_SELECT")
add_compile_definitions("DEBUG_SH_LANGUAGE_SERVER")
add_compile_definitions("DEBUG_SPAM")
add_compile_definitions("DEBUG_STRINGIMPL")
add_compile_definitions("DEBUG_SYNTAX_HIGHLIGHTING")
add_compile_definitions("DEBUG_TEXTEDITOR")
add_compile_definitions("DEFERRED_INVOKE_DEBUG")
add_compile_definitions("DHCPV4CLIENT_DEBUG")
add_compile_definitions("DHCPV4_DEBUG")
add_compile_definitions("DOUBLECLICK_DEBUG")
add_compile_definitions("DRAGDROP_DEBUG")
add_compile_definitions("DWARF_DEBUG")
add_compile_definitions("DYNAMIC_LOAD_DEBUG")
add_compile_definitions("E1000_DEBUG")
add_compile_definitions("EBR_DEBUG")
add_compile_definitions("EDITOR_DEBUG")
add_compile_definitions("ELF_IMAGE_DEBUG")
add_compile_definitions("EMOJI_DEBUG")
add_compile_definitions("ETHERNET_DEBUG")
add_compile_definitions("ETHERNET_VERY_DEBUG")
add_compile_definitions("EVENTLOOP_DEBUG")
add_compile_definitions("EVENT_DEBUG")
add_compile_definitions("EXEC_DEBUG")
add_compile_definitions("EXT2_DEBUG")
add_compile_definitions("EXT2_VERY_DEBUG")
add_compile_definitions("FIFO_DEBUG")
add_compile_definitions("FILEDESCRIPTION_DEBUG")
add_compile_definitions("FILL_PATH_DEBUG")
add_compile_definitions("FORK_DEBUG")
add_compile_definitions("FUTEXQUEUE_DEBUG")
add_compile_definitions("FUTEX_DEBUG")
add_compile_definitions("GBOXLAYOUT_DEBUG")
add_compile_definitions("GEMINIJOB_DEBUG")
add_compile_definitions("GEMINI_DEBUG")
add_compile_definitions("GENERATE_DEBUG_CODE")
add_compile_definitions("GHASH_PROCESS_DEBUG")
add_compile_definitions("GIF_DEBUG")
add_compile_definitions("GLOBAL_DTORS_DEBUG")
add_compile_definitions("GMENU_DEBUG")
add_compile_definitions("GPT_DEBUG")
add_compile_definitions("HEAP_DEBUG")
add_compile_definitions("HEX_DEBUG")
add_compile_definitions("HPET_COMPARATOR_DEBUG")
add_compile_definitions("HPET_DEBUG")
add_compile_definitions("HTTPSJOB_DEBUG")
add_compile_definitions("ICMP_DEBUG")
add_compile_definitions("ICO_DEBUG")
add_compile_definitions("IMAGE_DECODER_CLIENT_DEBUG")
add_compile_definitions("IMAGE_DECODER_DEBUG")
add_compile_definitions("IMAGE_LOADER_DEBUG")
add_compile_definitions("INTERRUPT_DEBUG")
add_compile_definitions("IOAPIC_DEBUG")
add_compile_definitions("IPC_DEBUG")
add_compile_definitions("IPV4_DEBUG")
add_compile_definitions("IPV4_SOCKET_DEBUG")
add_compile_definitions("IRC_DEBUG")
add_compile_definitions("IRQ_DEBUG")
add_compile_definitions("JOB_DEBUG")
add_compile_definitions("JPG_DEBUG")
add_compile_definitions("KEYBOARD_DEBUG")
add_compile_definitions("KEYBOARD_SHORTCUTS_DEBUG")
add_compile_definitions("KMALLOC_DEBUG_LARGE_ALLOCATIONS")
add_compile_definitions("LEXER_DEBUG")
add_compile_definitions("LOCK_DEBUG")
add_compile_definitions("LOCK_RESTORE_DEBUG")
add_compile_definitions("LOCK_TRACE_DEBUG")
add_compile_definitions("LOOKUPSERVER_DEBUG")
add_compile_definitions("Loader_DEBUG")
add_compile_definitions("MALLOC_DEBUG")
add_compile_definitions("MASTERPTY_DEBUG")
add_compile_definitions("MBR_DEBUG")
add_compile_definitions("MEMORY_DEBUG")
add_compile_definitions("MENU_DEBUG")
add_compile_definitions("MINIMIZE_ANIMATION_DEBUG")
add_compile_definitions("MOVE_DEBUG")
add_compile_definitions("MULTIPROCESSOR_DEBUG")
add_compile_definitions("NETWORK_TASK_DEBUG")
add_compile_definitions("NT_DEBUG")
add_compile_definitions("OBJECT_DEBUG")
add_compile_definitions("OCCLUSIONS_DEBUG")
add_compile_definitions("OFFD_DEBUG")
add_compile_definitions("PAGE_FAULT_DEBUG")
add_compile_definitions("PARSER_DEBUG")
add_compile_definitions("PATA_DEBUG")
add_compile_definitions("PATA_DEVICE_DEBUG")
add_compile_definitions("PATH_DEBUG")
add_compile_definitions("PCI_DEBUG")
add_compile_definitions("PNG_DEBUG")
add_compile_definitions("PORTABLE_IMAGE_LOADER_DEBUG")
add_compile_definitions("PROCESS_DEBUG")
add_compile_definitions("PROCFS_DEBUG")
add_compile_definitions("PS2MOUSE_DEBUG")
add_compile_definitions("PTHREAD_DEBUG")
add_compile_definitions("PTMX_DEBUG")
add_compile_definitions("REACHABLE_DEBUG")
add_compile_definitions("REGEX_DEBUG")
add_compile_definitions("RESIZE_DEBUG")
add_compile_definitions("RESOURCE_DEBUG")
add_compile_definitions("ROUTING_DEBUG")
add_compile_definitions("RTL8139_DEBUG")
add_compile_definitions("SAFE_SYSCALL_DEBUG")
add_compile_definitions("SB16_DEBUG")
add_compile_definitions("SCHEDULER_DEBUG")
add_compile_definitions("SCHEDULER_RUNNABLE_DEBUG")
add_compile_definitions("SELECTION_DEBUG")
add_compile_definitions("SERVICE_DEBUG")
add_compile_definitions("SH_DEBUG")
add_compile_definitions("SIGNAL_DEBUG")
add_compile_definitions("SLAVEPTY_DEBUG")
add_compile_definitions("SMP_DEBUG")
add_compile_definitions("SOCKET_DEBUG")
add_compile_definitions("STORAGE_DEVICE_DEBUG")
add_compile_definitions("SYSTEMSERVER_DEBUG")
add_compile_definitions("SYSTEM_MENU_DEBUG")
add_compile_definitions("TCP_DEBUG")
add_compile_definitions("TCP_SOCKET_DEBUG")
add_compile_definitions("TERMCAP_DEBUG")
add_compile_definitions("TERMINAL_DEBUG")
add_compile_definitions("THREAD_DEBUG")
add_compile_definitions("TLS_DEBUG")
add_compile_definitions("TTY_DEBUG")
add_compile_definitions("UCI_DEBUG")
add_compile_definitions("UHCI_DEBUG")
add_compile_definitions("UHCI_VERBOSE_DEBUG")
add_compile_definitions("UDP_DEBUG")
add_compile_definitions("UPDATE_COALESCING_DEBUG")
add_compile_definitions("VERY_DEBUG")
add_compile_definitions("VFS_DEBUG")
add_compile_definitions("VMWAREBACKDOOR_DEBUG")
add_compile_definitions("VOLATILE_PAGE_RANGES_DEBUG")
add_compile_definitions("VRA_DEBUG")
add_compile_definitions("WAITBLOCK_DEBUG")
add_compile_definitions("WAITQUEUE_DEBUG")
add_compile_definitions("WEAKABLE_DEBUG")
add_compile_definitions("WINDOWMANAGER_DEBUG")
add_compile_definitions("WSMESSAGELOOP_DEBUG")
add_compile_definitions("DEBUG_SOCKET")
add_compile_definitions("WSSCREEN_DEBUG")
add_compile_definitions("DEBUG_PATH")
# False positive: IF_BMP_DEBUG is not actually a flag.
# add_compile_definitions("IF_BMP_DEBUG")
set(PROCESS_DEBUG ON)
set(SCHEDULER_DEBUG ON)
set(SCHEDULER_RUNNABLE_DEBUG ON)
set(THREAD_DEBUG ON)
set(LOCK_DEBUG ON)
set(SIGNAL_DEBUG ON)
set(BMP_DEBUG ON)
set(WAITBLOCK_DEBUG ON)
set(WAITQUEUE_DEBUG ON)
set(MULTIPROCESSOR_DEBUG ON)
set(ACPI_DEBUG ON)
set(PAGE_FAULT_DEBUG ON)
set(CONTEXT_SWITCH_DEBUG ON)
set(SMP_DEBUG ON)
set(BXVGA_DEBUG ON)
set(PS2MOUSE_DEBUG ON)
set(VMWARE_BACKDOOR_DEBUG ON)
set(FILEDESCRIPTION_DEBUG ON)
set(PROCFS_DEBUG ON)
set(VFS_DEBUG ON)
set(IOAPIC_DEBUG ON)
set(IRQ_DEBUG ON)
set(INTERRUPT_DEBUG ON)
set(E1000_DEBUG ON)
set(IPV4_SOCKET_DEBUG ON)
set(LOCAL_SOCKET_DEBUG ON)
set(SOCKET_DEBUG ON)
set(TCP_SOCKET_DEBUG ON)
set(PCI_DEBUG ON)
set(PATA_DEBUG ON)
set(IO_DEBUG ON)
set(FORK_DEBUG ON)
set(POLL_SELECT_DEBUG ON)
set(HPET_DEBUG ON)
set(HPET_COMPARATOR_DEBUG ON)
set(MASTERPTY_DEBUG ON)
set(SLAVEPTY_DEBUG ON)
set(PTMX_DEBUG ON)
set(TTY_DEBUG ON)
set(CONTIGUOUS_VMOBJECT_DEBUG ON)
set(VRA_DEBUG ON)
set(COPY_DEBUG ON)
set(CURSOR_TOOL_DEBUG ON)
set(FILE_CONTENT_DEBUG ON)
set(GZIP_DEBUG ON)
set(CNETWORKJOB_DEBUG ON)
set(CSOCKET_DEBUG ON)
set(SAFE_SYSCALL_DEBUG ON)
set(GHASH_PROCESS_DEBUG ON)
set(NT_DEBUG ON)
set(CRYPTO_DEBUG ON)
set(DWARF_DEBUG ON)
set(HUNKS_DEBUG ON)
set(JOB_DEBUG ON)
set(GIF_DEBUG ON)
set(JPG_DEBUG ON)
set(EMOJI_DEBUG ON)
set(FILL_PATH_DEBUG ON)
set(PNG_DEBUG ON)
set(PORTABLE_IMAGE_LOADER_DEBUG ON)
set(SYNTAX_HIGHLIGHTING_DEBUG ON)
set(KEYBOARD_SHORTCUTS_DEBUG ON)
set(MARKDOWN_DEBUG ON)
set(REGEX_DEBUG ON)
set(TLS_DEBUG ON)
set(SPAM_DEBUG ON)
set(PARSER_DEBUG ON)
set(TOKENIZER_TRACE_DEBUG ON)
set(IMAGE_LOADER_DEBUG ON)
set(RESOURCE_DEBUG ON)
set(CACHE_DEBUG ON)
set(DHCPV4_DEBUG ON)
set(DHCPV4CLIENT_DEBUG ON)
set(IMAGE_DECODER_DEBUG ON)
set(SYSTEM_MENU_DEBUG ON)
set(SYSTEMSERVER_DEBUG ON)
set(SERVICE_DEBUG ON)
set(COMPOSE_DEBUG ON)
set(MINIMIZE_ANIMATION_DEBUG ON)
set(OCCLUSIONS_DEBUG ON)
set(MENUS_DEBUG ON)
set(WSSCREEN_DEBUG ON)
set(WINDOWMANAGER_DEBUG ON)
set(RESIZE_DEBUG ON)
set(MOVE_DEBUG ON)
set(DOUBLECLICK_DEBUG ON)
set(DISASM_DUMP_DEBUG ON)
set(PATH_DEBUG ON)
set(LOCK_TRACE_DEBUG ON)
set(LOCK_RESTORE_DEBUG ON)
set(FUTEXQUEUE_DEBUG ON)
set(FUTEX_DEBUG ON)
# False positive: LOG_DEBUG is a flag, but for a bitset, not a feature.
# add_compile_definitions("LOG_DEBUG")
# add_compile_definitions("LOG_DEBUG=ON")
# Clogs up build: The WrapperGenerator stuff is run at compile time.
# add_compile_definitions("WRAPPER_GERNERATOR_DEBUG")
# add_compile_definitions("WRAPPER_GERNERATOR_DEBUG=ON")