mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00: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
1 changed files with 5 additions and 2 deletions
|
@ -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…
Reference in a new issue