COMP: Check for -Wno-long-double before using
Older GCC on the Mac warns for use of long double, so we use -Wno-long-double. Newer GCC on the Mac does not have this flag and gives an error. We now check for the flag before using it. See bug #7357.
This commit is contained in:
parent
eb85676928
commit
129f3bef2d
|
@ -675,6 +675,9 @@ ELSE(RETSIGTYPE_TEST)
|
|||
ENDIF(RETSIGTYPE_TEST)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
||||
INCLUDE(CheckCCompilerFlag)
|
||||
CHECK_C_COMPILER_FLAG(-Wno-long-double HAVE_C_FLAG_Wno_long_double)
|
||||
IF(HAVE_C_FLAG_Wno_long_double)
|
||||
# The Mac version of GCC warns about use of long double. Disable it.
|
||||
GET_SOURCE_FILE_PROPERTY(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS)
|
||||
IF(MPRINTF_COMPILE_FLAGS)
|
||||
|
@ -684,6 +687,7 @@ IF(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
|||
ENDIF(MPRINTF_COMPILE_FLAGS)
|
||||
SET_SOURCE_FILES_PROPERTIES(mprintf.c PROPERTIES
|
||||
COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS})
|
||||
ENDIF(HAVE_C_FLAG_Wno_long_double)
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
||||
|
||||
INCLUDE(CMake/OtherTests.cmake)
|
||||
|
|
Loading…
Reference in New Issue