Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake

2011-11-14 Thread Michael Hertling
On 11/12/2011 01:39 PM, David Cole wrote:
> For reference, the bug Mike refers to is this one:
> 
>   http://public.kitware.com/Bug/view.php?id=11258
> 
> I always use the manual technique of shutting down VS, running CMake,
> and then re-opening VS. It's really not that bad, once you get used to
> it.
> 
> 
> David C.

Is it possibly an alternative to use "cmake --build" within an already
configured build tree, provided the VS IDE is not strictly necessary?
E.g., when porting a project from *nix to Windows, I usually open the
VS shell, run CMake on the project's source tree from within a build
directory and finally "cmake --build .". For last-minute changes, I
use the editor of my choice and invoke "cmake --build ." again.

With Makefiles on *nix, this approach works as expected, but with VS,
I noticed the following issue: The project is correctly rebuilt after
a change in a source file, but a change in a CMakeLists.txt file only
results in a regeneration of the solution and project files *without*
recompiling or relinking anything, i.e. it is solely the ZERO_CHECK
project which is rebuilt. In order to rebuild the actual targets, I
need to specify the "--clean-first" option to "cmake --build .". It
seems as if a changed VS project file doesn't make VS recompile the
affected source files, even if this is clearly necessary, e.g. due
to changed preprocessor definitions. Is this behavior intended or
VS-immanent, or should it be taken for buggy? Perhaps, a VS expert
could shed some light on this matter; it'd be greatly appreciated.

Regards,

Michael

> On Fri, Nov 11, 2011 at 5:48 PM, Michael Jackson
>  wrote:
>> It is worse and better.
>>
>> 1: CMake will generate the VS projects and solutions every time it needs to 
>> run. DO NOT EDIT the generated VS projects and solutions. Add the 
>> requirements to the CMake files.
>>
>> 2: If you are on VS2007/VS2008 and you do a "git pull" and then switch to VS 
>> and click build a cmake check is run FIRST. If anything is different the new 
>> solution and project files are generated and then the build continues. You 
>> will get a dialog asking if you want to reload all of the projects. Things 
>> are pretty nice.
>>
>> 3: If you are on VS2010 there is now a long standing bug that seems to have 
>> no solution where you basically have to do the following:
>>  Close the VS solution
>>  git pull
>>  run cmake to regenerate the solution and projects
>>  Open the Solution and Compile.
>>
>> Yep. Sucks. Purchased VS2010 last year and have yet to use it because of 
>> that bug. If we (the cmake community**) were to actually figure out how to 
>> solve the problem then VS2010 would be as seamless as VS2008. Here is hoping 
>> for the future.
>>
>> ** I have kept track of the bug. Kitware and others have put a lot of time 
>> into trying to fix the bug. It just seams to be one of those elusive fixes 
>> that there just may not be a solution to.
>> --
>> Mike Jackson 
>>
>> On Nov 11, 2011, at 5:30 PM, David Doria wrote:
>>
>>> I typically work in KDevelop which has CMake support, so if another
>>> developer pushes some new files and changes to the CMakeLists.txt of
>>> my project, I simply 'git pull' the project and then click "Build" and
>>> it knows exactly what to do - it runs CMake and then builds the
>>> project.
>>>
>>> However, when working with Visual Studio, do I have to 'git pull',
>>> then go open cmake-gui from the VS2010E terminal, re-configure and
>>> re-generate the project, then reimport the VS2010E project, then
>>> build? This seems horribly awkward. And the reverse appears to have
>>> the same problem - if working inside VS I add a file to the VS
>>> project, how do I 'export' this addition back to the git repo?
>>>
>>> Thanks,
>>>
>>> David
--

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


Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake

2011-11-12 Thread Michael Jackson

On Nov 12, 2011, at 11:08 AM, Bill Hoffman wrote:

> On 11/12/2011 10:51 AM, John Drescher wrote:
>>> It basically comes down to the inconvenience of having to do that with
>>> Visual Studio being outweighed (considerably!) by the cross-platform
>>> benefits of CMake.  (It does help that none of our developers use Windows as
>>> their primary development platform, so it only comes up when we make sure
>>> things are working on Windows...)
>>> 
>> 
>> I use Visual Studio 2010 daily for the last 6 months or so and the bug
>> is not that difficult for me to work with at all. I do admit it is
>> annoying when you get prompted 50 times to reload projects but most of
>> the time it does not do that. I mean if you only add files to a single
>> project it will not prompt you for the other 49. Now if I know the
>> change will be big, I usually close the solution and run cmake
>> externally from a script.
>> 
> Does this solution work for VS 2010:
> 
> There is an out of cmake solution for this.
> 
> http://vscommands.com/ [^]
> 
> If you install the VSCommands plugin free version, it will fix the reload 
> dialog to only ask once.
> 
> -Bill
> 
> --

So with CMake 2.8.6 and the vscommands installed with VS 2010 I will get ONLY a 
single dialog asking me to reload the VS solution file? If that is true I can 
handle that as an added requirement.

Thanks
Mike Jackson 
--

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


Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake

2011-11-12 Thread John Drescher
On Sat, Nov 12, 2011 at 11:08 AM, Bill Hoffman  wrote:
> On 11/12/2011 10:51 AM, John Drescher wrote:
>>>
>>> It basically comes down to the inconvenience of having to do that with
>>> Visual Studio being outweighed (considerably!) by the cross-platform
>>> benefits of CMake.  (It does help that none of our developers use Windows
>>> as
>>> their primary development platform, so it only comes up when we make sure
>>> things are working on Windows...)
>>>
>>
>> I use Visual Studio 2010 daily for the last 6 months or so and the bug
>> is not that difficult for me to work with at all. I do admit it is
>> annoying when you get prompted 50 times to reload projects but most of
>> the time it does not do that. I mean if you only add files to a single
>> project it will not prompt you for the other 49. Now if I know the
>> change will be big, I usually close the solution and run cmake
>> externally from a script.
>>
> Does this solution work for VS 2010:
>
> There is an out of cmake solution for this.
>
> http://vscommands.com/ [^]
>
> If you install the VSCommands plugin free version, it will fix the reload
> dialog to only ask once.
>
I have not tried that. I will do so and report back in around 2 weeks.
I am leaving for a vacation at 4:00 AM tomorrow and I do not think I
will have any time to test this..

John
--

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


Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake

2011-11-12 Thread Bill Hoffman

On 11/12/2011 10:51 AM, John Drescher wrote:

It basically comes down to the inconvenience of having to do that with
Visual Studio being outweighed (considerably!) by the cross-platform
benefits of CMake.  (It does help that none of our developers use Windows as
their primary development platform, so it only comes up when we make sure
things are working on Windows...)



I use Visual Studio 2010 daily for the last 6 months or so and the bug
is not that difficult for me to work with at all. I do admit it is
annoying when you get prompted 50 times to reload projects but most of
the time it does not do that. I mean if you only add files to a single
project it will not prompt you for the other 49. Now if I know the
change will be big, I usually close the solution and run cmake
externally from a script.


Does this solution work for VS 2010:

There is an out of cmake solution for this.

http://vscommands.com/ [^]

If you install the VSCommands plugin free version, it will fix the 
reload dialog to only ask once.


-Bill

--

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


Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake

2011-11-12 Thread John Drescher
> It basically comes down to the inconvenience of having to do that with
> Visual Studio being outweighed (considerably!) by the cross-platform
> benefits of CMake.  (It does help that none of our developers use Windows as
> their primary development platform, so it only comes up when we make sure
> things are working on Windows...)
>

I use Visual Studio 2010 daily for the last 6 months or so and the bug
is not that difficult for me to work with at all. I do admit it is
annoying when you get prompted 50 times to reload projects but most of
the time it does not do that. I mean if you only add files to a single
project it will not prompt you for the other 49. Now if I know the
change will be big, I usually close the solution and run cmake
externally from a script.

John
--

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


Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake

2011-11-12 Thread Clifford Yapp
That's what we do to.

It basically comes down to the inconvenience of having to do that with
Visual Studio being outweighed (considerably!) by the cross-platform
benefits of CMake.  (It does help that none of our developers use Windows
as their primary development platform, so it only comes up when we make
sure things are working on Windows...)

I really wish Microsoft would integrate support for CMake projects into
Visual Studio the way KDevelop has, although I suppose that's right up
there probability wise with hoping they'll integrate clang...

Cheers,
CY

On Sat, Nov 12, 2011 at 7:39 AM, David Cole  wrote:

> For reference, the bug Mike refers to is this one:
>
>  http://public.kitware.com/Bug/view.php?id=11258
>
> I always use the manual technique of shutting down VS, running CMake,
> and then re-opening VS. It's really not that bad, once you get used to
> it.
>
>
> David C.
>
>
> On Fri, Nov 11, 2011 at 5:48 PM, Michael Jackson
>  wrote:
> > It is worse and better.
> >
> > 1: CMake will generate the VS projects and solutions every time it needs
> to run. DO NOT EDIT the generated VS projects and solutions. Add the
> requirements to the CMake files.
> >
> > 2: If you are on VS2007/VS2008 and you do a "git pull" and then switch
> to VS and click build a cmake check is run FIRST. If anything is different
> the new solution and project files are generated and then the build
> continues. You will get a dialog asking if you want to reload all of the
> projects. Things are pretty nice.
> >
> > 3: If you are on VS2010 there is now a long standing bug that seems to
> have no solution where you basically have to do the following:
> >  Close the VS solution
> >  git pull
> >  run cmake to regenerate the solution and projects
> >  Open the Solution and Compile.
> >
> > Yep. Sucks. Purchased VS2010 last year and have yet to use it because of
> that bug. If we (the cmake community**) were to actually figure out how to
> solve the problem then VS2010 would be as seamless as VS2008. Here is
> hoping for the future.
> >
> > ** I have kept track of the bug. Kitware and others have put a lot of
> time into trying to fix the bug. It just seams to be one of those elusive
> fixes that there just may not be a solution to.
> > --
> > Mike Jackson 
> >
> > On Nov 11, 2011, at 5:30 PM, David Doria wrote:
> >
> >> I typically work in KDevelop which has CMake support, so if another
> >> developer pushes some new files and changes to the CMakeLists.txt of
> >> my project, I simply 'git pull' the project and then click "Build" and
> >> it knows exactly what to do - it runs CMake and then builds the
> >> project.
> >>
> >> However, when working with Visual Studio, do I have to 'git pull',
> >> then go open cmake-gui from the VS2010E terminal, re-configure and
> >> re-generate the project, then reimport the VS2010E project, then
> >> build? This seems horribly awkward. And the reverse appears to have
> >> the same problem - if working inside VS I add a file to the VS
> >> project, how do I 'export' this addition back to the git repo?
> >>
> >> Thanks,
> >>
> >> David
> >> --
> >
> > --
> >
> > 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
>
--

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

Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake

2011-11-12 Thread Mateusz Łoskot
On 12 November 2011 12:39, David Cole  wrote:
> For reference, the bug Mike refers to is this one:
>
>  http://public.kitware.com/Bug/view.php?id=11258
>
> I always use the manual technique of shutting down VS, running CMake,
> and then re-opening VS. It's really not that bad, once you get used to it.

Actually, there is no need to completely shut down VS.
File -> Close Solution or quick keyboard shortcut/accelerators use: Alt + F -> t
then run cmake
then File -> Recent Projects -> reopen yours or quick shortcut Alt + F -> j -> 1

Using keyboard makes this operation unnoticeable effort.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
--

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

Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake

2011-11-12 Thread David Cole
For reference, the bug Mike refers to is this one:

  http://public.kitware.com/Bug/view.php?id=11258

I always use the manual technique of shutting down VS, running CMake,
and then re-opening VS. It's really not that bad, once you get used to
it.


David C.


On Fri, Nov 11, 2011 at 5:48 PM, Michael Jackson
 wrote:
> It is worse and better.
>
> 1: CMake will generate the VS projects and solutions every time it needs to 
> run. DO NOT EDIT the generated VS projects and solutions. Add the 
> requirements to the CMake files.
>
> 2: If you are on VS2007/VS2008 and you do a "git pull" and then switch to VS 
> and click build a cmake check is run FIRST. If anything is different the new 
> solution and project files are generated and then the build continues. You 
> will get a dialog asking if you want to reload all of the projects. Things 
> are pretty nice.
>
> 3: If you are on VS2010 there is now a long standing bug that seems to have 
> no solution where you basically have to do the following:
>  Close the VS solution
>  git pull
>  run cmake to regenerate the solution and projects
>  Open the Solution and Compile.
>
> Yep. Sucks. Purchased VS2010 last year and have yet to use it because of that 
> bug. If we (the cmake community**) were to actually figure out how to solve 
> the problem then VS2010 would be as seamless as VS2008. Here is hoping for 
> the future.
>
> ** I have kept track of the bug. Kitware and others have put a lot of time 
> into trying to fix the bug. It just seams to be one of those elusive fixes 
> that there just may not be a solution to.
> --
> Mike Jackson 
>
> On Nov 11, 2011, at 5:30 PM, David Doria wrote:
>
>> I typically work in KDevelop which has CMake support, so if another
>> developer pushes some new files and changes to the CMakeLists.txt of
>> my project, I simply 'git pull' the project and then click "Build" and
>> it knows exactly what to do - it runs CMake and then builds the
>> project.
>>
>> However, when working with Visual Studio, do I have to 'git pull',
>> then go open cmake-gui from the VS2010E terminal, re-configure and
>> re-generate the project, then reimport the VS2010E project, then
>> build? This seems horribly awkward. And the reverse appears to have
>> the same problem - if working inside VS I add a file to the VS
>> project, how do I 'export' this addition back to the git repo?
>>
>> Thanks,
>>
>> David
>> --
>
> --
>
> 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


Re: [CMake] Workflow of a collaborative project in Visual Studio+CMake

2011-11-11 Thread Michael Jackson
It is worse and better.

1: CMake will generate the VS projects and solutions every time it needs to 
run. DO NOT EDIT the generated VS projects and solutions. Add the requirements 
to the CMake files.

2: If you are on VS2007/VS2008 and you do a "git pull" and then switch to VS 
and click build a cmake check is run FIRST. If anything is different the new 
solution and project files are generated and then the build continues. You will 
get a dialog asking if you want to reload all of the projects. Things are 
pretty nice.

3: If you are on VS2010 there is now a long standing bug that seems to have no 
solution where you basically have to do the following:
 Close the VS solution
 git pull
 run cmake to regenerate the solution and projects
 Open the Solution and Compile.

Yep. Sucks. Purchased VS2010 last year and have yet to use it because of that 
bug. If we (the cmake community**) were to actually figure out how to solve the 
problem then VS2010 would be as seamless as VS2008. Here is hoping for the 
future.

** I have kept track of the bug. Kitware and others have put a lot of time into 
trying to fix the bug. It just seams to be one of those elusive fixes that 
there just may not be a solution to.
--
Mike Jackson 

On Nov 11, 2011, at 5:30 PM, David Doria wrote:

> I typically work in KDevelop which has CMake support, so if another
> developer pushes some new files and changes to the CMakeLists.txt of
> my project, I simply 'git pull' the project and then click "Build" and
> it knows exactly what to do - it runs CMake and then builds the
> project.
> 
> However, when working with Visual Studio, do I have to 'git pull',
> then go open cmake-gui from the VS2010E terminal, re-configure and
> re-generate the project, then reimport the VS2010E project, then
> build? This seems horribly awkward. And the reverse appears to have
> the same problem - if working inside VS I add a file to the VS
> project, how do I 'export' this addition back to the git repo?
> 
> Thanks,
> 
> David
> --

--

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


[CMake] Workflow of a collaborative project in Visual Studio+CMake

2011-11-11 Thread David Doria
I typically work in KDevelop which has CMake support, so if another
developer pushes some new files and changes to the CMakeLists.txt of
my project, I simply 'git pull' the project and then click "Build" and
it knows exactly what to do - it runs CMake and then builds the
project.

However, when working with Visual Studio, do I have to 'git pull',
then go open cmake-gui from the VS2010E terminal, re-configure and
re-generate the project, then reimport the VS2010E project, then
build? This seems horribly awkward. And the reverse appears to have
the same problem - if working inside VS I add a file to the VS
project, how do I 'export' this addition back to the git repo?

Thanks,

David
--

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