cmake
[awesomized/libmemcached] / CMake / CheckDecl.cmake
diff --git a/CMake/CheckDecl.cmake b/CMake/CheckDecl.cmake
new file mode 100644 (file)
index 0000000..dac8065
--- /dev/null
@@ -0,0 +1,7 @@
+include(CheckCXXSymbolExists)
+
+# check for symbol and set HAVE_SYMBOL
+function(check_decl DECL HEADER)
+    safe_string(${DECL} DECL_CONST)
+    check_cxx_symbol_exists(${DECL} ${HEADER} HAVE_${DECL_CONST})
+endfunction(check_decl)