Re: [CMake] Build rule for specific file extension

2010-06-25 Thread Michael Wild
On 25. Jun, 2010, at 13:26 , Mathias Lafeldt wrote: > Hi, > > is there a way to tell CMake how to "compile" files based on their > extension? > > For example, here's a make rule to build an object file from a *.lst file: > > %.o : %.lst >echo "#include \"irx_imports.h\"" > build-imports.c

[CMake] Build rule for specific file extension

2010-06-25 Thread Mathias Lafeldt
Hi, is there a way to tell CMake how to "compile" files based on their extension? For example, here's a make rule to build an object file from a *.lst file: %.o : %.lst echo "#include \"irx_imports.h\"" > build-imports.c cat $< >> build-imports.c $(IOP_CC) $(IOP_CFLAGS) build-imports