[CMake] Single source, multiple binaries

Theodore Papadopoulo Theodore.Papadopoulo at sophia.inria.fr
Fri Aug 8 09:27:07 EDT 2008


    Hi,

I'm new to this list and a recent CMake user, so please accept in 
advance my apologies if these are a common question.
I have looked at the various FAQs or through google but did not find any 
answers to my problems...

1) My main problem is that I'd like to compile the same source many 
times just changing some compilation flags (mostly defines). I cannot 
find a way in the documentation or the FAQ to do that. I could add some 
ADD_CUSTOM_{COMMAND,TARGET} to do so, but that seems quite an overkill. 
Is there a simple way to do such
 a task ?

2) I'm using cmake 2.4.8 and according to the documentation, files 
generated using an ADD_CUSTOM_TARGET should be automatically cleaned 
with the target clean. I do not see that and had to explicitly set the 
property ADDITIONAL_MAKE_CLEAN_FILES (as specified for older cmake 
version). The CMakelists.txt is attached. Can someone explain me what 
I'm doing wrong ?

    Thank you very much,

       Theo.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080808/fd379142/attachment.txt>


More information about the CMake mailing list