mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
cmake: fix CheckFunctionExistsEx/CheckPrototypeDefinition (CMP0054)
This commit is contained in:
parent
dc624adf42
commit
43b69b2aed
@ -28,7 +28,7 @@
|
||||
# License text for the above reference.)
|
||||
|
||||
MACRO(CHECK_FUNCTION_EXISTS_EX FUNCTION VARIABLE)
|
||||
IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
||||
IF(${VARIABLE} MATCHES "^${VARIABLE}$")
|
||||
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
|
||||
MESSAGE(STATUS "Looking for ${FUNCTION}")
|
||||
@ -65,5 +65,5 @@ MACRO(CHECK_FUNCTION_EXISTS_EX FUNCTION VARIABLE)
|
||||
"Determining if the function ${FUNCTION} exists failed with the following output:\n"
|
||||
"${OUTPUT}\n\n")
|
||||
ENDIF(${VARIABLE})
|
||||
ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
||||
ENDIF()
|
||||
ENDMACRO(CHECK_FUNCTION_EXISTS_EX)
|
||||
|
@ -25,8 +25,7 @@
|
||||
|
||||
|
||||
function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
|
||||
|
||||
if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
|
||||
if (${_VARIABLE} MATCHES "^${_VARIABLE}$")
|
||||
set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
|
||||
|
||||
set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
@ -79,6 +78,5 @@ function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB
|
||||
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
|
||||
"${OUTPUT}\n\n${_SOURCE}\n\n")
|
||||
endif (${_VARIABLE})
|
||||
endif("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
|
||||
|
||||
endif()
|
||||
endfunction(CHECK_PROTOTYPE_DEFINITION)
|
||||
|
Loading…
x
Reference in New Issue
Block a user