-
Notifications
You must be signed in to change notification settings - Fork 128
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
Unclear what Config::build() returns #56
Comments
Right now I believe it's the root of the installation directory, but a PR to improve the docs would be much appreciated! |
Hmm. I was about to ask if this means that the code examples in
Maybe I've actually run into a bug, and the function is supposed to return Addendum: I decided to start surveying cmake's dependent crates, and the first one I checked has this which definitely seems to suggest that the examples are wrong and the free function's documentation is misleading! |
I believe returning |
I think this confusion comes from the library with the CMakeLists.txt CMake doesn't, strictly speaking, always produce binaries in the same place. The default target that cmake-rs uses is lammps installs to |
The output of this function is confusing and undocumented.
Based on the code samples in
README.mdlib.rs
, it would appear to be the directory where libs were installed. However, printing its value, I see that it is simply the install prefix (target/debug/build/lammps-sys-96aab2de8377bb22/out
), and I need to instead write something likeI'm not sure what to make of this. I'd call it a bug, but that's assuming that the function is supposed to return the libs dir!
Note: To reproduce what I'm seeing, this isn't exactly minimal, but:
git clone https://github.com/ExpHP/lammps-sys cd lammps-sys git checkout 01c3d3bff git submodule init git submodule update cargo build -v
and watch the build script output or linker flags. You'll see the path
target/debug/build/lammps-sys-xxxxxxxxx/out/lib64
, generated by this line of code, indicating that the return value ended inout
as opposed toout/lib
orout/lib64
.I see this even on the
travis
docker image, where much to my chagrin, it actually installs them tolib/
. (of course, the linking step fails there!)The text was updated successfully, but these errors were encountered: