[CMake] SET_SOURCE_FILES_PROPERTIES different properties for same file, same library
Michael Wild
themiwi at gmail.com
Wed May 12 07:47:40 EDT 2010
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
More information about the CMake
mailing list