Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] cmake build dir #853

Open
AndreiCherniaev opened this issue Nov 25, 2022 · 4 comments
Open

[DOC] cmake build dir #853

AndreiCherniaev opened this issue Nov 25, 2022 · 4 comments

Comments

@AndreiCherniaev
Copy link

AndreiCherniaev commented Nov 25, 2022

CMake 3.13 or newer supports the command line options -S and -B to specify source and binary directory, respectively.

In file libgd/docs/README.CMAKE was
In a sub directory of the top level:

$ mkdir bld
$ cd bld
$ cmake -DBUILD_TEST=1 <options> ..
$ make

I suggest use new text:
In top level directory (by default top level directory name is libgd):

$ cmake -S . -B buildFolderName -DBUILD_TEST=1 <options> 
$ cd buildFolderName
$ make

What do you thinking?

$ cmake -DBUILD_TEST=1 <options> ..

@vapier
Copy link
Member

vapier commented Nov 26, 2022

i don't see much point to suggesting more complicated options. if people want to look at the full cmake option set, they're free to. the docs are meant to be a quick start.

@AndreiCherniaev
Copy link
Author

AndreiCherniaev commented Nov 26, 2022

i don't see much point to suggesting more complicated options. if people want to look at the full cmake option set, they're free to. the docs are meant to be a quick start.

I suggest quick start. In docs I see more hard way.

  1. " sub directory of the top level". Dummy people create new directory and in this directory do your mkdir bld
  2. people thinking that
    <options> ..
    is one thing. So if someone doesn't need any options, someone will try just
    cmake -DBUILD_TEST=1

I suggest more user-friendly way!

@vapier
Copy link
Member

vapier commented Nov 27, 2022

passing -S & -B options is more complicated than simply using ...

if you want to suggest wording improvements to the text for clarity, feel free. i imagine using ../ would make it clear it's a dir. or we invert the order and suggest cmake .. -DBUILD_TEST=1 <options>.

@AndreiCherniaev
Copy link
Author

passing -S & -B options is more complicated than simply using ...

yes, passing -S & -B options is more complicated.

but your

$ mkdir bld
$ cd bld

Is very-very more complicated. Because user must well understand in which folder he working... Isn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants