libarchive: Avoid depending on if() to dereference a quoted variable

This commit is contained in:
Brad King 2014-09-08 10:01:47 -04:00 committed by Nils Gladitz
parent 2d97178b30
commit cede5cbd53
1 changed files with 2 additions and 2 deletions

View File

@ -840,14 +840,14 @@ ENDIF()
# Check functions
#
CMAKE_PUSH_CHECK_STATE() # Save the state of the variables
IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
IF (CMAKE_C_COMPILER_ID STREQUAL "GNU")
#
# During checking functions, we should use -fno-builtin to avoid the
# failure of function detection which failure is an error "conflicting
# types for built-in function" caused by using -Werror option.
#
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-builtin")
ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
ENDIF ()
CHECK_SYMBOL_EXISTS(_CrtSetReportMode "crtdbg.h" HAVE__CrtSetReportMode)
CHECK_FUNCTION_EXISTS_GLIBC(chflags HAVE_CHFLAGS)
CHECK_FUNCTION_EXISTS_GLIBC(chown HAVE_CHOWN)