Re: [CMake] Visual Studio .sln post generate modifications?

2015-11-27 Thread Petr Kmoch
Hi.

I don't know how exactly the Deploy checkbox value is stored inside the
.sln file, but CMake has built-in ways of adding arbitrary sections and
contents to the .sln file; see directory properties
VS_GLOBAL_SECTION_PRE_ (
https://cmake.org/cmake/help/latest/prop_dir/VS_GLOBAL_SECTION_PRE_section.html
) and VS_GLOBAL_SECTION_POST_ (
https://cmake.org/cmake/help/latest/prop_dir/VS_GLOBAL_SECTION_POST_section.html
). Perhaps you could use them to store the information in the .sln?

Petr

On Fri, Nov 27, 2015 at 4:24 PM, Tilman Skobowsky 
wrote:

> Hi,
>
> we currently use CMake 3.3.x (x >= 2) on a C++ source code with Windows
> target only.
> In our company we're exclusively using Visual Studio (Version 2015 right
> now).
>
> Since we're using remote debugging we have the following problem:
>
> In order to set up Remote Debugging with VS, you have to edit the settings
> in the "Debugging" pane of the target prefs (a.k.a add_executable()
> target). These debugger settings are stored in a ".vcxproj.user" file,
> which is perfect, because these files don't get touched by the cmake
> generator.
>
> However, in order to automatically deploy the target, one also has to set
> the "Deploy" checkmark in the "Configuration Manager" settings.
> Unfortunately, this setting is NOT saved in a user speciffic file. Instead
> it is saved in the main projects ".sln" file. (Thanks MS...).
>
> I just downloaded the 'cmake' sources to check how the section where this
> information goes is generated. For WinCE builds there is already code that
> emits the right information into the solution file.
>
> Now the best solution (for me) would be to add a target property that
> controls emiting this options. But I guess, this might not be an option
> that could be returned to the 'cmake' source tree, although I'd be willing
> to give it a try. (some info/references/pointers on how to do this are
> welcome)
>
> Second best solution would be a script or mechanism that can post process
> the SLN file after it has been generated by cmake but FROM WITHIN the
> configure/generate process. Is that possible in any way?
>
> Of course I know, that I could write some script in order to tweak the
> solution file after cmake is called, but I'd like to avoid this. I already
> made lot of use of additional options to shown up within CMakeGUI (which is
> really cool) and I'd like to be able to set some  "ENABLE_REMOTE_DEBUGGING"
> switch of some sort so that this can be configured in one place.
>
> TIA
> skybow
>
>
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Visual Studio .sln post generate modifications?

2015-11-27 Thread Tilman Skobowsky

Hi,

we currently use CMake 3.3.x (x >= 2) on a C++ source code with  
Windows target only.
In our company we're exclusively using Visual Studio (Version 2015  
right now).


Since we're using remote debugging we have the following problem:

In order to set up Remote Debugging with VS, you have to edit the  
settings in the "Debugging" pane of the target prefs (a.k.a  
add_executable() target). These debugger settings are stored in a  
".vcxproj.user" file, which is perfect, because these files don't get  
touched by the cmake generator.


However, in order to automatically deploy the target, one also has to  
set the "Deploy" checkmark in the "Configuration Manager" settings.  
Unfortunately, this setting is NOT saved in a user speciffic file.  
Instead it is saved in the main projects ".sln" file. (Thanks MS...).


I just downloaded the 'cmake' sources to check how the section where  
this information goes is generated. For WinCE builds there is already  
code that emits the right information into the solution file.


Now the best solution (for me) would be to add a target property that  
controls emiting this options. But I guess, this might not be an  
option that could be returned to the 'cmake' source tree, although  
I'd be willing to give it a try. (some info/references/pointers on  
how to do this are welcome)


Second best solution would be a script or mechanism that can post  
process the SLN file after it has been generated by cmake but FROM  
WITHIN the configure/generate process. Is that possible in any way?


Of course I know, that I could write some script in order to tweak  
the solution file after cmake is called, but I'd like to avoid this.  
I already made lot of use of additional options to shown up within  
CMakeGUI (which is really cool) and I'd like to be able to set some   
"ENABLE_REMOTE_DEBUGGING" switch of some sort so that this can be  
configured in one place.


TIA
skybow





--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake