[cmake-developers] target sources property
Brad King
brad.king at kitware.com
Fri Jun 7 08:40:19 EDT 2013
On 06/07/2013 08:35 AM, Stephen Kelly wrote:
> 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?
I wonder if we can use the SOURCES property but lift the read-only
restriction by special-casing the property storage similar to how
you do for include directories. It should know the cmSourceFile*
internally but present the value as a path to the source file
as specified by the project in the property value. Then replace
the ObjectLibraries member with another representation in the
special SOURCES property storage vector.
-Brad
More information about the cmake-developers
mailing list