[CMake] target property FOLDER

David Cole david.cole at kitware.com
Sat Oct 2 15:10:15 EDT 2010


This sounds like a reasonable idea, but at this point we will wait until
2.8.4 to incorporate such functionality into a release.

If you do make a patch, please also extend an existing test, or add a new
test that exercises the new functionality.

I just fixed up some issues with the first commit that introduced this
feature and pushed it to 'next' today:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd3249e11afeb38284ee8e2012134de4d410c92b
(Please base any new work on this latest commit.)

Hopefully, the dashboards like this tomorrow, and the fixes can make it into
2.8.3... because without the fixes, VS Express editions are impacted in a
rather ugly way.

Glad you like the new "feature!"

Thanks,
David


On Fri, Oct 1, 2010 at 6:31 PM, James Bigler <jamesbigler at gmail.com> wrote:

> On Fri, Oct 1, 2010 at 4:16 PM, James Bigler <jamesbigler at gmail.com>wrote:
>
>> I really like the new FOLDER property for targets.
>>
>> I'm wondering if it could be extended to allow me to set this for a whole
>> directory.  Something like:
>>
>> set_property(DIRECTORY PROPERTY FOLDER "Utilities/3rdParty")
>> add_executable(a ...)
>> add_library(b ...)
>> add_subdirectory(dir) # dir also get's this property
>>
>> This would make it pretty speedy to add this feature without having to add
>> the set_property to each target, and it would be easier to maintain.  Any
>> new projects would get the property as well.
>>
>> James
>>
>
> I'm looking at the CL that added it:
>
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6ac0aacf6c3ce17141870e252fda77d994782d3
>
> diff --git a/Source/cmGlobalVisualStudio7Generator.cxx
> b/Source/cmGlobalVisualStudio7Generator.cxx
>
>
> index 9631e9a..f455810 100644 (file)
> --- a/Source/cmGlobalVisualStudio7Generator.cxx
> +++ b/Source/cmGlobalVisualStudio7Generator.cxx
> @@ -300,6 +300,48 @@ void
> cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
>                              cmLocalGenerator::START_OUTPUT);
>          this->WriteProject(fout, vcprojName, dir.c_str(),
>                             *target);
> +
> +        // Create "solution folder" information from FOLDER target
> property
> +        //
> +        if (this->UseFolderProperty())
> +          {
> +          const char *targetFolder = target->GetProperty("FOLDER");
> +          if (targetFolder)
> +            {
>
> It seems like some extra code could be added to also check the directory
> properties if the target properties doesn't exit.  Is this hard to do?
> Should I attempt it and submit a patch?
>
> James
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101002/a00466ca/attachment.htm>


More information about the CMake mailing list