summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-03-22 18:45:51 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-03-22 18:45:51 (GMT)
commit4344e83fcf521072b0101b67a50e31e7f4032abb (patch)
tree44b982fa02c3ec8329302fef8a9df5e7c8792ed0 /Tests
parent49a3fa18aac82a2854adc995931a7160a80c77d5 (diff)
parent93c56a7040a1080811494c4d69fc62041fc8caeb (diff)
downloadCMake-4344e83fcf521072b0101b67a50e31e7f4032abb.zip
CMake-4344e83fcf521072b0101b67a50e31e7f4032abb.tar.gz
CMake-4344e83fcf521072b0101b67a50e31e7f4032abb.tar.bz2
Merge topic 'asn_check_proto'
93c56a7 Tests: Added test for check_prototype_definition. 4f252ab Modules: Added CheckPrototypeDefinition module.
Diffstat (limited to 'Tests')
-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")