-
Notifications
You must be signed in to change notification settings - Fork 36
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
...
as path (e.g. BUILD_DIR=".../libbezier-debug/build"
) in Development doc is confusing
#284
Comments
@Cilyan It is not intended to be a valid path. It is intended to be a "fill in the blanks" for the reader. I thought it was clear that it's "fill in the blanks" since it isn't a valid path (as you are pointing out here). Clearly I was mistaken on the clarity. Do you have any suggestions on how to improve this block so that it's actual advice along the lines of:
For context, this is what he is referring to https://bezier.readthedocs.io/en/2021.2.12/development.html#libbezier |
The fact that
|
...
as path (e.g. BUILD_DIR=".../libbezier-debug/build"
) in Development doc is confusing
I finally had time to dive a bit more into it. Indeed, it works only if you set the path as absolute. For the documentation, it is more common to find something like Also, people often expect that these kind of lines can simply be copied and pasted, so this could work: $ SRC_DIR="src/fortran/"
$ BUILD_DIR="$(pwd)/build"
$ INSTALL_PREFIX="usr"
$ mkdir -p "${BUILD_DIR}"
$ cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX:PATH="${INSTALL_PREFIX}" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-S "${SRC_DIR}" \
-B "${BUILD_DIR}"
$ cmake \
--build "${BUILD_DIR}" \
--config Debug \
--target install and
Note that I removed the chevrons, they get copied together with the command and when pasted in a terminal, this doesn't work. The dollar signs are properly placed apart by the code-block directive, so they do not get copied when selecting multiple lines. |
First,
...
is not a "valid" path under Linux (it would create a...
folder, which is a hidden folder, so probably not what we want).Then,
CMAKE_INSTALL_PREFIX:PATH
seems to be relative toBUILD_DIR
, so withthe installation path is effectively
../libbezier-release/libbezier-release/usr
(=../libbezier-release/build/../libbezier-release/usr
). Although, in the docs, the way the same pattern is repeated for both variables (.../libbezier-release/
) lets the user think that both paths are relative to the current directory. In any case,BEZIER_INSTALL_PREFIX
cannot be set toINSTALL_PREFIX
but should rather be set to$BUILD_DIR/$INSTALL_PREFIX
....
is, I believe, the Windows equivalent for../..
(go up two folders), and it would somehow work if one would just replace...
with../..
(because you go down two folders, then up two folders). But it works only in this very specific case and in a real situation, going up two folders may not be possible (location not writable, for example if you are working in/home/user/bezier
,/tmp/bezier
, ...).Finally, it seems that I still get some issues, despite my best effort to convert the snippets from the docs to something Linux would accept:
despite the files being there:
Version used:
The text was updated successfully, but these errors were encountered: