diff options
Diffstat (limited to 'modules/CheckPrototypeExists.cmake')
-rw-r--r-- | modules/CheckPrototypeExists.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/CheckPrototypeExists.cmake b/modules/CheckPrototypeExists.cmake new file mode 100644 index 00000000..4797865f --- /dev/null +++ b/modules/CheckPrototypeExists.cmake @@ -0,0 +1,16 @@ +# - Check if the prototype for a function exists. +# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE) +# +# FUNCTION - the name of the function you are looking for +# HEADER - the header(s) where the prototype should be declared +# VARIABLE - variable to store the result +# + +INCLUDE(CheckTypeSize) + +MACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) + SET(CMAKE_EXTRA_INCLUDE_FILES ${_HEADER}) + CHECK_TYPE_SIZE(${_SYMBOL} ${_RESULT}) + SET(CMAKE_EXTRA_INCLUDE_FILES) +ENDMACRO(CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) + |