COMP: enable ANSI C, this should make it work with the HP-UX compiler
Alex
This commit is contained in:
parent
bd8b733d5e
commit
5615d47198
|
@ -1,5 +1,12 @@
|
||||||
project(SourceGroups)
|
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
|
# this is not really a test which can fail
|
||||||
# it is more an example with several source_group()
|
# it is more an example with several source_group()
|
||||||
# commands.
|
# commands.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int foo();
|
extern int foo(void);
|
||||||
int bar();
|
extern int bar(void);
|
||||||
int foobar();
|
extern int foobar(void);
|
||||||
int barbar();
|
extern int barbar(void);
|
||||||
int baz();
|
extern int baz(void);
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue