On 12. May, 2010, at 13:03 , Bryn Lloyd wrote:

> Hi,
> 
> I would like to cmakeify the UMFPACK/AMD libraries by Timothy Davis.
> 
> I need to compile the same source file, multiple times, with different 
> flags/defines in order to link the resulting object files into one library.
> 
> something like this:
> 
>       $(CC) -DDINT  -c umf_analyze.c -o umf_i_analyze.o
>       $(CC) -DDLONG -c umf_analyze.c -o umf_l_analyze.o
> 
>       $(AR) libumfpack.a umf_i_analyze.o umf_l_analyze.o
> 
>       $(RANLIB) libumfpack.a
> 
> 
> I don't see how I can do this with CMake, unless I actually copy/rename the 
> source files first, e.g.:
>       $(COPY) umf_analyze.c umf_i_analyze.c
>       $(COPY) umf_analyze.c umf_l_analyze.c
> 
>       $(C) -DDINT  -c umf_i_analyze.c -o umf_i_analyze.o
>       $(C) -DDLONG -c umf_l_analyze.c -o umf_l_analyze.o
> 
> 
> Thanks for any ideas,
> 
> Bryn

No need to copy, just CONFIGURE_FILE a wrapper into the build tree which 
includes the source file. Sure, will give you a little overhead but that's 
probably negligible.

Michael

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to