[CMake] CMAKE changing Visual Studio Settings

Eric Clark eclark at ara.com
Wed Jul 30 15:55:59 EDT 2014


No problem at all Joseph! I am glad to hear that you got it working! Thanks - Eric

From: anoneironaut at gmail.com [mailto:anoneironaut at gmail.com] On Behalf Of Joseph Rosensweig
Sent: Wednesday, July 30, 2014 2:42 PM
To: Eric Clark
Cc: John Drescher; CMake ML
Subject: Re: [CMake] CMAKE changing Visual Studio Settings

Thanks for all the help on this topic.

The user file generation worked like a charm.  Really helped out a lot.

Thanks to Nils as well for the great advice.  This makes my MSVC projects much more manageable.

Thanks!

On Tue, Jul 22, 2014 at 2:12 PM, Eric Clark <eclark at ara.com> wrote:


> -----Original Message-----
> From: CMake [mailto:cmake-bounces at cmake.org] On Behalf Of John
> Drescher
> Sent: Monday, July 21, 2014 3:55 PM
> To: Joseph Rosensweig
> Cc: CMake ML
> Subject: Re: [CMake] CMAKE changing Visual Studio Settings
>
> > So CMAKE can't control the options int he *.user files I guess :-\?
> > Would a potential workaround be to find a command line tool that can
> > edit these and run it as a post-build script?
>
> CMake gives you the functionality needed to edit these via your own script. I
> mean reading and writing files replacing text.
In our CMake system, we wanted to be able to set the program to execute when "Start Debugging" was clicked in Visual Studio. This option is stored in the *.user file and thus you cannot change it via CMake directly. However, you CAN build a template of the *.user file and put some CMake variables inside of it. Then, when you build the project files with CMake, you can use the configure_file command to create the user's *.user file from the template and the values you have for each variable in the template. This option works beautifully and it is very easy to setup.

Hope this helps...
Eric

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



More information about the CMake mailing list