apenwarr-redo/docs/cookbook/c/main.c
Avery Pennarun 6dae51f4d2 Experimental new redoconf C/C++ build/autoconfiguration system.
To test it out, try this:
	./do -j10 build
	cd docs/cookbook/c
	redo -j10 test

It should detect all the compilers on your system and make three
separate builds for each one: normal, debug, and optimized.  Then it
tries to run a test program under each one.

If there are windows cross compilers and you also have 'wine'
installed, it'll try running the test program under wine as well.

redoconf currently has no documentation other than the example program.
We'll fix that later.
2019-02-23 06:52:25 -05:00

22 lines
429 B
C

#include "main.h"
#include "libhello/hello.h"
#include "monotime.h"
#include "redoconf.h"
#include <stdio.h>
#if EXTRA_RC_INCLUDED != 1
#error "EXTRA_RC was not included!"
#endif
int main() {
hello();
printf("Timestamp: %s\n", stamp_time());
printf("Monotime: %lld\n", monotime());
#ifdef CXX
printf("Length of 'hello world': %d\n", cpp_test());
#else
printf("No C++ compiler found.\n");
#endif
flag_test();
return 0;
}