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

Merge pull request #1643 from Adriankhl/lldb_string

Fix lldb string inspection for debug build
This commit is contained in:
Ivan Savenko 2023-03-09 15:52:20 +02:00 committed by GitHub
commit 9ca576d68c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()