[CMake] SET_SOURCE_FILES_PROPERTIES different properties for same file, same library

Bryn Lloyd blloyd at vision.ee.ethz.ch
Wed May 12 07:03:41 EDT 2010


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


More information about the CMake mailing list