[cmake-commits] alex committed CMakeLists.txt 1.3 1.4 main.c 1.3 1.4
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Aug 28 10:59:10 EDT 2007
Update of /cvsroot/CMake/CMake/Tests/SourceGroups
In directory public:/mounts/ram/cvs-serv5687
Modified Files:
CMakeLists.txt main.c
Log Message:
COMP: enable ANSI C, this should make it work with the HP-UX compiler
Alex
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/SourceGroups/CMakeLists.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CMakeLists.txt 27 Aug 2007 18:17:29 -0000 1.3
+++ CMakeLists.txt 28 Aug 2007 14:59:08 -0000 1.4
@@ -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.
Index: main.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/SourceGroups/main.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- main.c 28 Aug 2007 12:36:31 -0000 1.3
+++ main.c 28 Aug 2007 14:59:08 -0000 1.4
@@ -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()
{
More information about the Cmake-commits
mailing list