Robert Dailey | 1 Nov 2011 01:06
Picon

Re: SCC bindings missing AUXPATH support?

I fiddled around with TortoiseGit and managed to create the patch. It is attached.


Please integrate this into your repository so it is included in version 2.8.7 :)

---------
Robert Dailey


On Mon, Oct 31, 2011 at 5:41 PM, Robert Dailey <rcdailey <at> gmail.com> wrote:
I have added source code support for this myself. I updated the following files:

cmLocalVisualStudio7Generator.cxx
cmLocalVisualStudio10TargetGenerator.cxx

The existing SCC support code was already in these files, I just added the SccAuxPath support to it.

I'm not an expert at creating patch files outside of TortoiseSVN on Windows, so could someone explain how to create a patch file for these on Windows 7? Also how would you like me to deliver the code? I hope to see it introduced in version 2.8.7

Thanks.

---------
Robert Dailey



On Mon, Oct 31, 2011 at 4:10 PM, Robert Dailey <rcdailey-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
There are actually 4 SCC related key/value pairs used in VS2003 VCPROJ files:

SccProjectName="SAK"
SccAuxPath="SAK"
SccLocalPath="SAK"
SccProvider="SAK"

CMake supports these 3 via set_target_properties():

VS_SCC_LOCALPATH
VS_SCC_PROJECTNAME
VS_SCC_PROVIDER

Apparently one more is needed to support "SccAuxPath":

VS_SCC_AUXPATH

Can someone add support for this? Thanks.

---------
Robert Dailey


--

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
Robert Dailey | 1 Nov 2011 01:20
Picon

Re: SCC bindings missing AUXPATH support?

I forgot to explain why I made the change to begin with. Basically this all comes down to Perforce binding support. SccAuxPath is used to specify the Perforce connection string. Without this, each project opened will prompt the user for the information via modal dialog. This gets very annoying...


Here is an example of how I have setup each of my projects:

set_target_properties(
"${project_name}" PROPERTIES
VS_SCC_AUXPATH "P4SCC#${PERFORCE_SERVER}##${PERFORCE_USER}##${PERFORCE_WORKSPACE}"
VS_SCC_LOCALPATH "${CMAKE_SOURCE_DIR}"
VS_SCC_PROJECTNAME "Perforce Project"
VS_SCC_PROVIDER "MSSCCI:Perforce SCM"
)

All of the PERFORCE_ variables are cache variables, so that the user can specify their credentials, server, and workspace. These are all formatted into the connection string perforce expects.

The resulting XML in the VCPROJ looks like so:

SccProjectName="Perforce Project"
SccLocalPath="C:/Code/work/sandbox"
SccProvider="MSSCCI:Perforce SCM"

When I open the generated solution, all projects load perfectly with no prompts and everything is binded to source control :)

---------
Robert Dailey


On Mon, Oct 31, 2011 at 7:06 PM, Robert Dailey <rcdailey <at> gmail.com> wrote:
I fiddled around with TortoiseGit and managed to create the patch. It is attached.

Please integrate this into your repository so it is included in version 2.8.7 :)

---------
Robert Dailey



On Mon, Oct 31, 2011 at 5:41 PM, Robert Dailey <rcdailey-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I have added source code support for this myself. I updated the following files:

cmLocalVisualStudio7Generator.cxx
cmLocalVisualStudio10TargetGenerator.cxx

The existing SCC support code was already in these files, I just added the SccAuxPath support to it.

I'm not an expert at creating patch files outside of TortoiseSVN on Windows, so could someone explain how to create a patch file for these on Windows 7? Also how would you like me to deliver the code? I hope to see it introduced in version 2.8.7

Thanks.

---------
Robert Dailey



On Mon, Oct 31, 2011 at 4:10 PM, Robert Dailey <rcdailey-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
There are actually 4 SCC related key/value pairs used in VS2003 VCPROJ files:

SccProjectName="SAK"
SccAuxPath="SAK"
SccLocalPath="SAK"
SccProvider="SAK"

CMake supports these 3 via set_target_properties():

VS_SCC_LOCALPATH
VS_SCC_PROJECTNAME
VS_SCC_PROVIDER

Apparently one more is needed to support "SccAuxPath":

VS_SCC_AUXPATH

Can someone add support for this? Thanks.

---------
Robert Dailey



--

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
Jerry | 1 Nov 2011 01:27
Favicon

Symlinks not created on OS X

The OS X .dmg installer, cmake-2.8.6-Darwin64-universal.dmg, at
http://www.cmake.org/cmake/resources/software.html, failed to install symlinks in /usr/bin as
promised. I received six messages, I think from the Cmake app, of this nature:

Failed create symlink installation may be incomplete: x

where x was ccmake, cmake, cmake-gui, cmakexbuild, cpack, and ctest. I made the symlinks manually and
things seem to work OK.

OS X 10.6.8.

Thanks,
Jerry

P.S. It might be a good idea to improve the English consruction of these messages. 
--

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

YangXi | 1 Nov 2011 05:12
Picon
Favicon

(no subject)

--

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
Steven Velez | 1 Nov 2011 05:19
Picon

Re: Source control bindings feature in CMake needs better documentation

Hi Robert,

I don't pretend to know everything there is to know about Visual
Studio SCC integration, but I have gotten this to work before with a
bit of trial and error, and reverse-engineering the entries visual
studio creates for these properties.

To answer your most recent question, there is no way to specify
perforce connection/user/workspace information in the cmake file as
these properties are just forwarded to the generated .vcproj files,
and there is no way to set the parameters you are looking for there.

In your examples, [I have found that] the values you have for project
name and provider are correct when hooking up to perforce. However, I
think you are a bit off the mark on the first parameter to
set_target_properties.  This is supposed to be the name of the
_target_ you are binding to scc (the result of a add_executable,
add_library command etc.) not the project name.   In the cmake->VS
mapping, a cmake target is a VS project, and a cmake project is a VS
solution (so if you have a project command for every target, you can
most likely start simplifying things there). I mention this because it
may have something to do with the excessive prompting you are
getting... though reviewing my team's integration shows that we are
doing this same thing.  Another thing you might want to adjust is the
local path.... I have had the most success with passing a path
relative to the target's binary directory using the target path format
(in this case, always windows... i.e. use back slashes.  To compute
this dynamically, you may have success using file(RELATIVE_PATH) with
CMAKE_CURRENT_BINARY_DIR, and CMAKE_SOURCE_DIR.  In VS2010, at least,
we have found that in order to avoid being prompted to save on exit,
we must strip trailing slashes from the path we build in this way.

Following this pattern, we have gotten to the point where we are
prompted once for port and workspace/clientspec on each invocation of
visual studio, but it is only once and not once per project in the
solution.

Steven

On Mon, Oct 31, 2011 at 2:36 PM, Robert Dailey <rcdailey@...> wrote:
> While waiting on a response I did some experimentation:
>
> set_target_properties(
> "${project_name}" PROPERTIES
> VS_SCC_LOCALPATH "${CMAKE_SOURCE_DIR}"
> VS_SCC_PROJECTNAME "Perforce Project"
> VS_SCC_PROVIDER "MSSCCI:Perforce SCM"
> )
> This seems to work in VS 2003 but the annoying thing is that when I open the
> solution, every single project (about 120 of them) each prompt me for my
> username, workspace, and server URL to perforce server.
> Is there no way to specify this connection/user/workspace information in
> CMake so that when I open the solution it already knows this stuff?
> ---------
> Robert Dailey
>
>
> On Mon, Oct 31, 2011 at 12:24 PM, Robert Dailey <rcdailey@...> wrote:
>>
>> Hey guys,
>> Our team is running Perforce here at work and I want to setup any Visual
>> Studio projects generated to use source control bindings for Perforce.
>> The documentation for VS_SCC_PROJECTNAME, VS_SCC_LOCALPATH,
>> VS_SCC_PROVIDER is pretty bad and I really have no clue on how to use these.
>> Could someone explain what each is and possibly provide some examples on how
>> they are used for Perforce?
>> Thanks!!
>>
>> ---------
>> Robert Dailey
>
>
> --
>
> 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
>
--

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

Steven Velez | 1 Nov 2011 05:34
Picon

Enhancing the Visual Studio Generators' Source Control integration

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
--

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

Steven Velez | 1 Nov 2011 05:59
Picon

Re: SCC bindings missing AUXPATH support?

Hi Robert,

I reviewed the patch, and I am not sure vsAuxPath should be a
requirement.  As I stated earlier, we've gotten the binding to work
acceptably without it and I assume others have as well.  Further, some
users may prefer to enter their connection information in to the
perforce dialog on first invocation instead of having to configure the
cmake cache to setup their bindings.

To be clear, I have no objections to adding AuxPath support (not that
my objections count for anything around here).  Its that just as it
stands now, if you don't supply it, you won't get any bindings.

Also, you may have better results getting your patch integrated by
opening a defect in cmake's bug tracker and attaching the patch to
that.  The preferred patch generation method is also described here:
http://www.mail-archive.com/cmake-wChDC6UyXvPYtjvyW6yDsg <at> public.gmane.org/msg36619.html

By the way, as I stated in an earlier mail, if you wish to pursue this
further, if you change "C:/Code/work/sandbox" to "..\..\.." where that
path points to "C:\Code\work\sandbox" relative to the target being
bound, you should have better results.

Thanks,
Steven

On Mon, Oct 31, 2011 at 8:20 PM, Robert Dailey <rcdailey@...> wrote:
> I forgot to explain why I made the change to begin with. Basically this all
> comes down to Perforce binding support. SccAuxPath is used to specify the
> Perforce connection string. Without this, each project opened will prompt
> the user for the information via modal dialog. This gets very annoying...
> Here is an example of how I have setup each of my projects:
> set_target_properties(
> "${project_name}" PROPERTIES
> VS_SCC_AUXPATH
> "P4SCC#${PERFORCE_SERVER}##${PERFORCE_USER}##${PERFORCE_WORKSPACE}"
> VS_SCC_LOCALPATH "${CMAKE_SOURCE_DIR}"
> VS_SCC_PROJECTNAME "Perforce Project"
> VS_SCC_PROVIDER "MSSCCI:Perforce SCM"
> )
> All of the PERFORCE_ variables are cache variables, so that the user can
> specify their credentials, server, and workspace. These are all formatted
> into the connection string perforce expects.
> The resulting XML in the VCPROJ looks like so:
> SccProjectName="Perforce Project"
> SccLocalPath="C:/Code/work/sandbox"
> SccAuxPath="P4SCC#perforce.mycompany.com:3666##rdailey##rdailey-t510-sandbox"
> SccProvider="MSSCCI:Perforce SCM"
> When I open the generated solution, all projects load perfectly with no
> prompts and everything is binded to source control :)
> ---------
> Robert Dailey
>
>
> On Mon, Oct 31, 2011 at 7:06 PM, Robert Dailey <rcdailey@...> wrote:
>>
>> I fiddled around with TortoiseGit and managed to create the patch. It is
>> attached.
>> Please integrate this into your repository so it is included in version
>> 2.8.7 :)
>>
>> ---------
>> Robert Dailey
>>
>>
>> On Mon, Oct 31, 2011 at 5:41 PM, Robert Dailey <rcdailey@...> wrote:
>>>
>>> I have added source code support for this myself. I updated the following
>>> files:
>>> cmLocalVisualStudio7Generator.cxx
>>> cmLocalVisualStudio10TargetGenerator.cxx
>>> The existing SCC support code was already in these files, I just added
>>> the SccAuxPath support to it.
>>> I'm not an expert at creating patch files outside of TortoiseSVN on
>>> Windows, so could someone explain how to create a patch file for these on
>>> Windows 7? Also how would you like me to deliver the code? I hope to see it
>>> introduced in version 2.8.7
>>> Thanks.
>>>
>>> ---------
>>> Robert Dailey
>>>
>>>
>>> On Mon, Oct 31, 2011 at 4:10 PM, Robert Dailey <rcdailey@...>
>>> wrote:
>>>>
>>>> There are actually 4 SCC related key/value pairs used in VS2003 VCPROJ
>>>> files:
>>>> SccProjectName="SAK"
>>>> SccAuxPath="SAK"
>>>> SccLocalPath="SAK"
>>>> SccProvider="SAK"
>>>> CMake supports these 3 via set_target_properties():
>>>> VS_SCC_LOCALPATH
>>>> VS_SCC_PROJECTNAME
>>>> VS_SCC_PROVIDER
>>>> Apparently one more is needed to support "SccAuxPath":
>>>> VS_SCC_AUXPATH
>>>> Can someone add support for this? Thanks.
>>>>
>>>> ---------
>>>> Robert Dailey
>>>
>>
>
>
> --
>
> 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
>
--

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

Anton Sibilev | 1 Nov 2011 10:29
Picon

Visual Studio generator and visible projects

Hello! Can you help me, please?

I'm generating VS 2010 solution/projects and finally when I open main solution file I can SEE only ALL_BUILD project.
All builds fine, all projects exists. But I can't see them and work with sources from them directly. What's wrong?
--

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
Eric Noulard | 1 Nov 2011 10:54
Picon

Re: Visual Studio generator and visible projects

2011/11/1 Anton Sibilev <anton.sibilev@...>:
> Hello! Can you help me, please?
> I'm generating VS 2010 solution/projects and finally when I open main
> solution file I can SEE only ALL_BUILD project.
> All builds fine, all projects exists. But I can't see them and work with
> sources from them directly. What's wrong?

Which version of CMake are you using?

What does your main CMakeLists.txt looks like?

Did you use any
   add_executable or add_library in it?
--

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

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

Anton Sibilev | 1 Nov 2011 10:57
Picon

Re: Visual Studio generator and visible projects

2.8.6. Just a minute later found that problem was in incorrect FOLDER property... Sorry!

2011/11/1 Eric Noulard <eric.noulard <at> gmail.com>
2011/11/1 Anton Sibilev <anton.sibilev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> Hello! Can you help me, please?
> I'm generating VS 2010 solution/projects and finally when I open main
> solution file I can SEE only ALL_BUILD project.
> All builds fine, all projects exists. But I can't see them and work with
> sources from them directly. What's wrong?

Which version of CMake are you using?

What does your main CMakeLists.txt looks like?

Did you use any
  add_executable or add_library in it?
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org

--

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

Gmane