[CMake] Properties on Projects ( was: Enhancing the Visual Studio Generators' Source Control integration )

Steven Velez sbv1976 at gmail.com
Wed Nov 2 10:06:15 EDT 2011


Trying again more directly.  Sorry for the chattiness.

Is there a good way to allow users to set properties on projects that
generators can read.

I was thinking to use standardized global properties e.g.) <Project
Name>_VS_SCC_LOCALPATH, however the existing properties like this (
<projectname>_SOURCE_DIR and <projectname>_BINARY_DIR ) are implicitly
read-only.  Would there be a reason to avoid my proposal?

Thanks,
Steven

On Tue, Nov 1, 2011 at 12:34 AM, Steven Velez <sbv1976 at gmail.com> wrote:
> Hi All,
>
> We have noticed, that using the VS_SCC_* target properties, we can
> bind to a perforce SCM server.  However, the way that SCC works the
> perforce plugin has to prompt the user for connection information.
> When we were doing this with hand-made visual studio solutions, we
> would only be prompted once when the workspace was fresh and clean,
> and the information would be retained thereafter.  With our
> CMake-generated solutions, we are prompted on every invocation of
> visual studio.  We'd like to get back to the fewer prompts workflow.
>
> After much research and trial and error, we have discovered that this
> seems to be because the bindings created by cmake are stored in the
> visual studio project files...and only there.  It seems that a more
> complete binding also records some SCC-related properties in the
> solution file...
>
> Therefore, I started hacking on the visual studio generator to try and
> decipher how this functionality would be added to cmake, and made good
> progress.  However, there are some solution file properties related to
> SCC that must be recorded for the solution itself.  For most entries,
> I can just query the targets' VS_SCC_ properties, but there are no
> such properties for the solution/project.   What's more, is there is
> no existing precedent, that I can find, for user-specified project
> properties.  So I am not sure how I would be able to give the user
> control over what these properties may be.  In my scenario, with the
> perforce SCC plugin, I _could_ get the necessary properties form the
> first target, but I doubt this is the general solution otherwise there
> is simply too much redundancy in the protocol/format.
>
> Long question short... is there an existing, reliable way for the user
> to provide per-project properties that the generator can get at?
>
> Thanks,
> Steven
>


More information about the CMake mailing list