Review fixes

This commit is contained in:
Dale Glass 2021-04-06 00:54:59 +02:00
parent 43f6fd82f4
commit e070a21bf4
2 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@
macro(SETUP_MEMORY_DEBUGGER)
if ("$ENV{VIRCADIA_MEMORY_DEBUGGING}")
if (DEFINED VIRCADIA_THREAD_DEBUGGING )
if (VIRCADIA_THREAD_DEBUGGING)
message(FATAL_ERROR "Thread debugging and memory debugging can't be enabled at the same time." )
endif()

View file

@ -9,18 +9,18 @@
macro(SETUP_THREAD_DEBUGGER)
if ("$ENV{VIRCADIA_THREAD_DEBUGGING}")
if (DEFINED VIRCADIA_MEMORY_DEBUGGING )
if (VIRCADIA_MEMORY_DEBUGGING )
message(FATAL_ERROR "Thread debugging and memory debugging can't be enabled at the same time." )
endif ()
SET( VIRCADIA_THREAD_DEBUGGING true )
SET(VIRCADIA_THREAD_DEBUGGING true)
endif ()
if (VIRCADIA_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_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 ()
@ -30,7 +30,7 @@ if (VIRCADIA_THREAD_DEBUGGING)
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 (UNIX)
message(FATAL_ERROR "Thread debugging is not supported on this platform.")
endif()
endif ()
endmacro(SETUP_THREAD_DEBUGGER)