From 93c56a7040a1080811494c4d69fc62041fc8caeb Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 4 Mar 2011 16:36:29 +0100 Subject: [PATCH] Tests: Added test for check_prototype_definition. --- Tests/TryCompile/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt index 90c2cfce20..938c092c0c 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")