[CMake] Problem with set_target_properties on mixed-source library
Martin Apel
martin.apel at simpack.de
Mon Sep 29 10:00:34 EDT 2008
Hi all,
I have a library consisting of multiple sources from Fortran and C, e.g.
file1.f, file2.f, file3.c.
I want to generate this library in two different versions, where in one
of those versions the Fortran files are compiled with different options,
in my case with -ipo.
That means:
libv1.a = file1.o file2.o file3.o compiled without
ipo-options
libv2.a = file1.o file2.o with ipo-option, file3.o without ipo-option
I tried to use set_target_properties on libv2 to set the ipo-flag, but
this also sets this option for the C files, which the compiler does not
understand.
I also cannot use set_source_properties, because the same source files
will be compiled with different options.
How can I use CMake to generate both libraries with the correct flags?
Both libraries have to be generated for the same build configuration, so
I cannot make the distinction
with respect to build configurations.
Regards,
Martin
____________
Virus checked by G DATA AntiVirus
Version: AVB 19.43 from 29.09.2008
More information about the CMake
mailing list