Re: [PATCH v3 02/12] cmake: update instructions for portable CMakeLists.txt
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Nov 3, 2022, 09:42 UTC
- Message-ID
- <059cf6aa-d288-6584-4d48-90f831de5344@dunelm.org.uk>
- In-Reply-To
- <patch-v3-02.12-7a21f4aa24c-20221101T225022Z-avarab@gmail.com>
On 01/11/2022 22:51, Ævar Arnfjörð Bjarmason wrote:
Show 27 quoted lines
> The instructions for running CMake went back & forth between *nix, > Windows and Visual Studio instructions Let's create headings and split > the existing instructions up into those new sections. > > Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> > --- > contrib/buildsystems/CMakeLists.txt | 66 +++++++++++++++++++++-------- > 1 file changed, 48 insertions(+), 18 deletions(-) > > diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt > index 494da807c53..7bc123da315 100644 > --- a/contrib/buildsystems/CMakeLists.txt > +++ b/contrib/buildsystems/CMakeLists.txt > @@ -4,7 +4,48 @@ > > #[[ > > -Instructions how to use this in Visual Studio: > +== Overview == > + > +The top-level Makefile is Git's primary build environment, and a lot > +of things are missing (and probably always will be) from this CMake > +alternative. > + > +The primary use-case for maintaining this CMake build recipe is to > +have nicer IDE integration on Windows. To get Visual Studio-specific > +instructions see "== Visual Studio & Windows ==" below.
If that is the primary use-case (which I agree it is) then it perhaps we should but the instructions for that use at the top of the document.
Show 9 quoted lines
> + > +== Creating a build recipe == > + > +To create the build recipe run: > + > + cmake -S contrib/buildsystems -B contrib/buildsystems/out -DCMAKE_BUILD_TYPE=Release > + > +For alternative "-DCMAKE_BUILD_TYPE=<type>" flags see instructions > +under the "== -DCMAKE_BUILD_TYPE=<type> ==" heading below.
Rather than forcing the reader to jump back and forth, perhaps we could document -DCMAKE_BUILD_TYPE and -GNinja here.
Best Wishes
Phillip