mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Add back compiler warnings on macOS (oops)
This commit is contained in:
parent
ce9b16d6f6
commit
f9a05ebb21
|
@ -255,34 +255,36 @@ if(CMAKE_GENERATOR STREQUAL "Ninja")
|
|||
add_cxx_compiler_flag_if_supported(OUR_FLAGS -fcolor-diagnostics)
|
||||
endif()
|
||||
|
||||
if(NOT MSVC AND NOT HAIKU AND NOT TARGET_OS STREQUAL "mac")
|
||||
if(NOT FUSE_LD STREQUAL OFF)
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=${FUSE_LD})
|
||||
if(FLAG_SUPPORTED_fuse_ld_${FUSE_LD})
|
||||
message(STATUS "Using ${FUSE_LD} linker")
|
||||
endif()
|
||||
else()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR NOT ENABLE_IPO)
|
||||
# GCC+LTO: pthread_create has failed: Resource temporarily unavailable
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=mold)
|
||||
if(FLAG_SUPPORTED_fuse_ld_mold)
|
||||
message(STATUS "Using mold linker")
|
||||
else()
|
||||
# Does not support GCC+LTO
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=lld)
|
||||
if(FLAG_SUPPORTED_fuse_ld_lld)
|
||||
message(STATUS "Using lld linker")
|
||||
else()
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=gold)
|
||||
if(FLAG_SUPPORTED_fuse_ld_gold)
|
||||
message(STATUS "Using gold linker")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT MSVC AND NOT HAIKU)
|
||||
IF(NOT TARGET_OS STREQUAL "mac")
|
||||
if(NOT FUSE_LD STREQUAL OFF)
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=${FUSE_LD})
|
||||
if(FLAG_SUPPORTED_fuse_ld_${FUSE_LD})
|
||||
message(STATUS "Using ${FUSE_LD} linker")
|
||||
endif()
|
||||
else()
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=gold)
|
||||
if(FLAG_SUPPORTED_fuse_ld_gold)
|
||||
message(STATUS "Using gold linker")
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR NOT ENABLE_IPO)
|
||||
# GCC+LTO: pthread_create has failed: Resource temporarily unavailable
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=mold)
|
||||
if(FLAG_SUPPORTED_fuse_ld_mold)
|
||||
message(STATUS "Using mold linker")
|
||||
else()
|
||||
# Does not support GCC+LTO
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=lld)
|
||||
if(FLAG_SUPPORTED_fuse_ld_lld)
|
||||
message(STATUS "Using lld linker")
|
||||
else()
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=gold)
|
||||
if(FLAG_SUPPORTED_fuse_ld_gold)
|
||||
message(STATUS "Using gold linker")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -fuse-ld=gold)
|
||||
if(FLAG_SUPPORTED_fuse_ld_gold)
|
||||
message(STATUS "Using gold linker")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue