[cmake-developers] target sources property

Stephen Kelly steveire at gmail.com
Fri Jun 7 08:35:02 EDT 2013


Brad King wrote:

> On 06/07/2013 04:42 AM, Stephen Kelly wrote:
>> Brad King wrote:
>>> Oops, yes I meant TARGET_OBJECTS.
>> 
>> And what is the trickyness with it?
> 
> It is not currently tricky.  I'm saying it may be tricky to
> convert the storage over to a sources target property.
> Perhaps it is simpler than I think though.  You'll find
> out when you get there :)
> 

I looked into it a bit and found that the SOURCES target property already 
exists. I was going to just add 

                                                                                                                                                                                              
+    for(std::vector<std::string>::iterator i = this-
>ObjectLibraries.begin();                                                                                                                                     
+        i != this->ObjectLibraries.end(); ++i)                                                                                                                                                                    
+      {                                                                                                                                                                                                           
+      ss << sep;                                                                                                                                                                                                  
+      sep = ";";                                                                                                                                                                                                  
+      ss << "$<TARGET_OBJECTS:" + *i + ">";
+      }              

and make set_source_files_properties ignore entries of the form 
$<TARGET_OBJECTS:foo>, but I wonder if it would be better to create a new 
property?

Thanks,

Steve.





More information about the cmake-developers mailing list