summaryrefslogtreecommitdiff
path: root/Tests/SourceGroups
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-08-28 10:59:08 -0400
committerAlexander Neundorf <neundorf@kde.org>2007-08-28 10:59:08 -0400
commit5615d4719833a672427b4792594aa55f3bf4a950 (patch)
treeb0344318a900b878ee5d7a00fb2ded8871e09256 /Tests/SourceGroups
parentbd8b733d5e3df7ae584090d4558b1617489eae8b (diff)
downloadcmake-5615d4719833a672427b4792594aa55f3bf4a950.tar.gz
COMP: enable ANSI C, this should make it work with the HP-UX compiler
Alex
Diffstat (limited to 'Tests/SourceGroups')
-rw-r--r--Tests/SourceGroups/CMakeLists.txt7
-rw-r--r--Tests/SourceGroups/main.c10
2 files changed, 12 insertions, 5 deletions
diff --git a/Tests/SourceGroups/CMakeLists.txt b/Tests/SourceGroups/CMakeLists.txt
index b0b2405f8b..30f66631c4 100644
--- a/Tests/SourceGroups/CMakeLists.txt
+++ b/Tests/SourceGroups/CMakeLists.txt
@@ -1,5 +1,12 @@
project(SourceGroups)
+# We need ansi C support, otherwise it doesn't build e.g. on HP-UX:
+# main.c", line 3: error 1705: Function prototypes are an ANSI feature.
+IF(CMAKE_ANSI_CFLAGS)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
+ENDIF(CMAKE_ANSI_CFLAGS)
+
+
# this is not really a test which can fail
# it is more an example with several source_group()
# commands.
diff --git a/Tests/SourceGroups/main.c b/Tests/SourceGroups/main.c
index 2c1002ed8a..212e64baaa 100644
--- a/Tests/SourceGroups/main.c
+++ b/Tests/SourceGroups/main.c
@@ -1,10 +1,10 @@
#include <stdio.h>
-int foo();
-int bar();
-int foobar();
-int barbar();
-int baz();
+extern int foo(void);
+extern int bar(void);
+extern int foobar(void);
+extern int barbar(void);
+extern int baz(void);
int main()
{