1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00

Fix lldb string inspection for debug build

This commit is contained in:
Adriankhl 2023-03-06 10:00:04 +01:00
parent 7ef5163d9d
commit 4955e01ef2

View File

@ -300,7 +300,7 @@ if(ANDROID)
list(APPEND SYSTEM_LIBS log)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR NOT WIN32)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpointer-arith")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wuninitialized")
@ -320,6 +320,12 @@ if(CMAKE_COMPILER_IS_GNUCXX OR NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=array-bounds") # false positives in boost::multiarray during release build, keep as warning-only
endif()
# Fix string inspection with lldb
# https://stackoverflow.com/questions/58578615/cannot-inspect-a-stdstring-variable-in-lldb
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fstandalone-debug")
endif()
if(UNIX)
set(SYSTEM_LIBS ${SYSTEM_LIBS} ${CMAKE_DL_LIBS})
endif()