summaryrefslogtreecommitdiffstats
path: root/Modules/CheckFunctionExists.c
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-20 17:16:50 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-20 17:16:50 (GMT)
commit76e9af1575cf264e5af6e825c0af4da80be0b3e2 (patch)
tree549c8f2870f8403b788c676657aeb114ea7027cc /Modules/CheckFunctionExists.c
parent157e2b4ac3a067107561d4ccc2b08ea3555cce44 (diff)
downloadCMake-76e9af1575cf264e5af6e825c0af4da80be0b3e2.zip
CMake-76e9af1575cf264e5af6e825c0af4da80be0b3e2.tar.gz
CMake-76e9af1575cf264e5af6e825c0af4da80be0b3e2.tar.bz2
Add two commonly used modules. First one checks if the function exists, the second one checks the size of type
Diffstat (limited to 'Modules/CheckFunctionExists.c')
-rw-r--r--Modules/CheckFunctionExists.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c
new file mode 100644
index 0000000..e205b64
--- /dev/null
+++ b/Modules/CheckFunctionExists.c
@@ -0,0 +1,15 @@
+#ifdef CHECK_FUNCTION_EXISTS
+
+char CHECK_FUNCTION_EXISTS();
+
+int main()
+{
+ CHECK_FUNCTION_EXISTS();
+ return 0;
+}
+
+#else /* CHECK_FUNCTION_EXISTS */
+
+# error "CHECK_FUNCTION_EXISTS has to specify the function"
+
+#endif /* CHECK_FUNCTION_EXISTS */