mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
Check for -Werror=unguarded_availability
support before forcing it
The compiler flag `-Werror=unguarded_availability` was hard-coded for macOS, but is not supported by GCC on macOS 10.10 (Yosemite). Test for support with CHECK_CXX_COMPILER_FLAG before forcing it.
This commit is contained in:
parent
2bb53f7253
commit
16a94db702
@ -5,8 +5,11 @@
|
||||
# This is the case for at least Cygwin and Newlib.
|
||||
LIST(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE=1)
|
||||
IF(APPLE)
|
||||
# 10.7+ only.
|
||||
LIST(APPEND CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Werror=unguarded-availability")
|
||||
INCLUDE(CheckCXXCompilerFlag)
|
||||
CHECK_CXX_COMPILER_FLAG("-Werror=unguarded-availability" REQUIRES_UNGUARDED_AVAILABILITY)
|
||||
IF(REQUIRES_UNGUARDED_AVAILABILITY)
|
||||
LIST(APPEND CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Werror=unguarded-availability")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Try using CMake's own logic to locate curses/ncurses
|
||||
|
Loading…
x
Reference in New Issue
Block a user