summaryrefslogtreecommitdiffstats
path: root/Tests/TryCompile
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-03-04 15:36:29 (GMT)
committerBrad King <brad.king@kitware.com>2011-03-18 18:03:37 (GMT)
commit93c56a7040a1080811494c4d69fc62041fc8caeb (patch)
tree44b853dbd627a7132df3a8d59d290a6f5806df58 /Tests/TryCompile
parent4f252abea5f1d17c60f6ff115c9c44cc0b6f1df6 (diff)
downloadCMake-93c56a7040a1080811494c4d69fc62041fc8caeb.zip
CMake-93c56a7040a1080811494c4d69fc62041fc8caeb.tar.gz
CMake-93c56a7040a1080811494c4d69fc62041fc8caeb.tar.bz2
Tests: Added test for check_prototype_definition.
Diffstat (limited to 'Tests/TryCompile')
-rw-r--r--Tests/TryCompile/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt
index 90c2cfc..938c092 100644
--- a/Tests/TryCompile/CMakeLists.txt
+++ b/Tests/TryCompile/CMakeLists.txt
@@ -232,3 +232,16 @@ IF("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
CHECK_C_COMPILER_FLAG("-Werror;-Wstrict-prototypes" C_STRICT_PROTOTYPES)
TEST_ASSERT(C_STRICT_PROTOTYPES "CHECK_C_COMPILER_FLAG failed -Werror -Wstrict-prototypes")
ENDIF()
+
+#######################################################################
+#
+# also test that the check_prototype_definition macro works
+
+include(CheckPrototypeDefinition)
+
+check_prototype_definition(remove
+ "int remove(const char *pathname)"
+ "0"
+ "stdio.h"
+ TEST_REMOVE_PROTO)
+test_assert(TEST_REMOVE_PROTO "check_prototype_definition for remove() failed")