37 lines · 1.3 KB · Text
RawDownload
##  MemoryDebugger.cmake##  Copyright 2021-2026 Overte e.V.##  Distributed under the Apache License, Version 2.0.#  See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html# macro(SETUP_THREAD_DEBUGGER)if ("$ENV{OVERTE_THREAD_DEBUGGING}")    message(STATUS "Enabling thread debugging.")    if (OVERTE_MEMORY_DEBUGGING)        message(FATAL_ERROR "Thread debugging and memory debugging can't be enabled at the same time.")    endif ()     SET(OVERTE_THREAD_DEBUGGING true)endif () if (OVERTE_THREAD_DEBUGGING)  if (UNIX)    if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")        # for clang on Linux        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fno-omit-frame-pointer")        SET(CMAKE_EXE_LINKER_FLAGS "-fsanitize=thread ${CMAKE_EXE_LINKER_FLAGS}")        SET(CMAKE_SHARED_LINKER_FLAGS "-fsanitize=thread ${CMAKE_EXE_LINKER_FLAGS}")    else ()        # for gcc on Linux        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fno-omit-frame-pointer")        SET(CMAKE_EXE_LINKER_FLAGS " -fsanitize=thread ${CMAKE_EXE_LINKER_FLAGS}")        SET(CMAKE_SHARED_LINKER_FLAGS "-fsanitize=thread ${CMAKE_EXE_LINKER_FLAGS}")    endif()  else()    message(FATAL_ERROR "Thread debugging is not supported on this platform.")  endif()endif ()endmacro(SETUP_THREAD_DEBUGGER)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t