[antlr-interest] C Target Linux tip

Ivan Brezina ibre5041 at ibrezina.net
Tue Aug 9 13:44:21 PDT 2011


Hi
I have two simple proposals for C target.
1. On windows you use pragmas to avoid unwanted compiler warnings
Similar thing is doable on gcc too.

#pragma GCC diagnostic ignored "-Wunused-variable"

Since gcc version 4.6 it is even possible to do this:

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic pop

2. For those who prefer cmake build system over automake tools
I attached build script for cmake. I offers same options as automake
but is is easier to "nest" libantlr3c library inside some larger project.
I was tested on Linux(Ubuntu 32bit/64bit) and also on 64bit Windows.
Mingw build was not tested.

Ivan



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
Url: http://www.antlr.org/pipermail/antlr-interest/attachments/20110809/8e32e52b/attachment.txt 


More information about the antlr-interest mailing list