[CMake] appending values to properties

Alexander Neundorf a.neundorf-work at gmx.net
Wed Jan 25 03:02:50 EST 2006


Hi,  
  
there are properties like OBJECT_DEPENDS and ADDITIONAL_MAKE_CLEAN_FILES.  
Add entries to them is quite tedious:  
  
GET_SOURCE_FILE_PROPERTY(_depends file.cpp OBJECT_DEPENDS)  
IF(_depends)  
   SET(_depends ${_depends} anotherdependfile.h)  
ELSE(_depends)  
   SET(_depends anotherdependfile.h)  
ENDIF(_depends)  
SET_SOURCE_FILES_PROPERTIES(file.cpp PROPERTIES OBJECT_DEPENDS  
${_depends} )  
  
The IF test is required because if the property hasn't been set yet, it  
has the value "NOTFOUND" instead of empty.  
  
I have two suggestions:  
-make the returned variable empty instead of "NOTFOUND" -> might be  
incompatible  
  
-add an option to SET_XXX_PROPERTIES() "APPEND" or something like this,  
so that one could simply do:  
SET_SOURCE_FILES_PROPERTIES(file.cpp APPEND PROPERTIES OBJECT_DEPENDS  
anotherdependfile.h )  
 
What do you think ?  
  
Are files marked as "OUTPUT" in a CUSTOM_COMMAND actually automatically  
added the the list of files which will be deleted on "make clean" ?  
  
Alex  
  
  
  

-- 
10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++


More information about the CMake mailing list