Re: [RFH] CMake: detect if being run via Visual Studio, independent of build generator?
- From
Philip Oakley <philipoakley@iee.email>
- Date
- May 30, 2021, 10:52 UTC
- Message-ID
- <953d685c-3c89-7377-ed49-b79fb4e0acb5@iee.email>
- In-Reply-To
- <CAOjrSZtRH-sqh8RJm3W00dUWTbT-xcpzDWCQFt=3CNaVnOyVWQ@mail.gmail.com>
quick thoughts.. On 30/05/2021 01:14, Matt Rogers wrote:
> (resending because client reconfigured to not use plaintext)
;-)
> > Reading through the documentation, Visual Studio seems to support > CmakePresets.json [1]
Is that stored with the project, or with the VS installation (still to read [1] beyond a v quick scan..)
> for handling configuration of cmake options. It > might be worth it to keep the defaults as is.
Given that it's just changed, do you mean ' keep it as new - Ninja' or 'keep it as old - VS generator'..
Show 6 quoted lines
> But provide a variable > for forcing vcpkg and a CMakePresets.json for Visual Studio > (and other such tools) to use. > > This is nice since Visual Studio users wouldn't need to rely on the > slower Visual Studio * generators to run their builds,
[implies, keep as Ninja, I think ?]
> while leaving > non Visual Studio users still able to easily run builds. So maybe there's > a way for everyone to be happy?
I'm hoping to ensure the project builds 'straight out of the tin' [mixed metaphor 2,3], for those who are cross disciplinary (such as myself;-)
I'll have a good look at [1], thanks.
Philip
> > 1: https://devblogs.microsoft.com/cppblog/cmake-presets-integration-in-visual-studio-and-visual-studio-code/ >
[2] https://en.wikipedia.org/wiki/Out_of_the_box_(feature) [3] https://www.ronseal.com/the-ronseal-phrase/ (UK)