mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +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,9 +5,12 @@
|
||||||
# This is the case for at least Cygwin and Newlib.
|
# This is the case for at least Cygwin and Newlib.
|
||||||
LIST(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE=1)
|
LIST(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE=1)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
# 10.7+ only.
|
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")
|
LIST(APPEND CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Werror=unguarded-availability")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Try using CMake's own logic to locate curses/ncurses
|
# Try using CMake's own logic to locate curses/ncurses
|
||||||
FIND_PACKAGE(Curses)
|
FIND_PACKAGE(Curses)
|
||||||
|
|
Loading…
Reference in a new issue