mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-27 23:37:05 -05:00
build: Fix building issues on macOS with clang 18
This commit is contained in:
@@ -582,6 +582,12 @@ macro(setupCompilerFlags target)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND APPLE)
|
||||
execute_process(COMMAND brew --prefix llvm OUTPUT_VARIABLE LLVM_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${LLVM_PREFIX}/lib/c++")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${LLVM_PREFIX}/lib/c++")
|
||||
endif()
|
||||
|
||||
# Disable some warnings for gcc
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
set(IMHEX_C_CXX_FLAGS "${IMHEX_C_CXX_FLAGS} -Wno-restrict -Wno-stringop-overread -Wno-stringop-overflow -Wno-dangling-reference")
|
||||
|
||||
4
lib/third_party/jthread/includes/jthread.hpp
vendored
4
lib/third_party/jthread/includes/jthread.hpp
vendored
@@ -3,5 +3,9 @@
|
||||
#if __cpp_lib_jthread >= 201911L
|
||||
#include <thread>
|
||||
#else
|
||||
#define __stop_callback_base __stop_callback_base_j
|
||||
#define __stop_state __stop_state_j
|
||||
#include "../jthread/source/jthread.hpp"
|
||||
#undef __stop_callback_base
|
||||
#undef __stop_state
|
||||
#endif
|
||||
Reference in New Issue
Block a user