[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ucing commitcheck to test compile code

From: Fabian Cenedese
Subject: Re: ucing commitcheck to test compile code
Date: Mon, 04 Aug 2003 09:22:03 +0200

>I have setup a file to test comple any perl source which is 
>added to a repository, i would like to do the same with gcc for any c/c++ 
>code. Has anyone already done this, or have a useful commitcheck script. Is  
>there a command which lets you just test a c file for syntax? (For perl im 
>using 'perl -c' which does the test compile).

I don't have a script, but I think you can use gcc with the switch that just
outputs the preprocessed file. If preprocessing is without errors it should
also compile (more or less :). But don't forget that c files also need includes
to be compiled (also accessible from the script). And it uses quite some
time, especially for many files. I'd say this is not necessary, you may be
better off if you automate a checkout/update and build the whole system
instead of single files. If you do this like once a day errors shouldn't be
too hard to be tracked down.

bye  Fabi

reply via email to

[Prev in Thread] Current Thread [Next in Thread]