[CMake] Using m4 as a additional preprocessor for C/C++

Prasad H. L. hlprasu at gmail.com
Fri Jun 5 13:02:06 EDT 2009


Can I define a new source type, like .m4 and add rules for it? That
would be ideal, I feel, for my case.

2009/6/5 Tyler Roscoe <tyler at cryptio.net>:
> On Fri, Jun 05, 2009 at 10:10:07PM +0530, Prasad H. L. wrote:
>> 2009/6/5 Denis Scherbakov <denis_scherbakov at yahoo.com>:
>> >
>> >> Is it possible to set the preprocessing to all .m4 files
>> >> avoiding a
>> >> manual specification of list of files to processed?
>> >
>> > If your list of files changes all the time, you can use FILE(GLOB...)
>> > to find all *.m4 files to automate process.
>>
>> I try this out.
>
> FYI this approach is not recommended since CMake then has no way to know
> if you added a new file and thus cannot regenerate your build system for
> you automatically.
>
> tyler
>



-- 
Prasad H. L.
PhD Student (with Dr. Shalabh Bhatnagar)
Department of Computer Science and Automation,
Indian Institute of Science,
Bangalore - 560012


More information about the CMake mailing list