diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-01-15 13:49:12 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-01-15 13:49:12 +0000 |
commit | b3e6c6d3bbb0faf683d9114f53ee142136a495ac (patch) | |
tree | f84757bd51d304484f40f1535143bb9e2900bc23 /modules/CheckPrototypeExists.cmake | |
parent | 4292a33d977a50b268991ccc2d8e61bf2e001820 (diff) | |
download | extra-cmake-modules-b3e6c6d3bbb0faf683d9114f53ee142136a495ac.tar.gz extra-cmake-modules-b3e6c6d3bbb0faf683d9114f53ee142136a495ac.tar.bz2 |
-small wrapper around cmake's CheckTypeSize to turn it into a "CheckPrototypeExists"
Alex
svn path=/trunk/KDE/kdesdk/cmake/; revision=498414
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) + |