-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
pkgconfig integration wrongly rendered if tests are run #2907
Comments
Thanks for reporting. Maybe @doronbehar @eli-schwartz @xvitaly @ericonr who worked on pkg-config related PRs in the past can help here. |
The pkgconfig file points to /usr/local/include if the test suite is run: nlohmann/json#2907 https://bugs.archlinux.org/task/71086 git-svn-id: file:///srv/repos/svn-community/svn@991991 9fca08f4-af9d-4005-b8df-a31f2cc04f65
The pkgconfig file points to /usr/local/include if the test suite is run: nlohmann/json#2907 https://bugs.archlinux.org/task/71086 git-svn-id: file:///srv/repos/svn-community/svn@991991 9fca08f4-af9d-4005-b8df-a31f2cc04f65
Is this just #2324 and #2318 again? For what it's worth, I simply don't understand the initial resolution at all. The testsuite should not be writing into the main project's build configuration. Admittedly, I'm equally at fault here, for slapping on a band-aid fix in the second link. In self-defense, I find cmake incredibly confusing, and at the time I believe I thought it would be enough. But as later history showed, it ends up producing the wrong content... and I just do not think that "don't test those tests" is the correct way to handle it. I don't actually understand the underlying problem (and haven't really investigated it), but... why does running a test that executes cmake to build a test project, cause the main build configuration to execute the |
I also have little experience with pkg-config and only use CMake in this project to serve my needs (i.e., compile and execute the tests). |
I could not reproduce in Ubuntu 22.04, cmake 3.22.1.
In all tests the main file ( Can you drive me where (file?, install output?) the error was found? |
I've also tried to reproduce this issue before the 3.11.0 release and was unable to do so. I suspect this might have been fixed when uses of CMAKE_BINARY_DIR were replaced with PROJECT_BINARY_DIR. |
Thanks for looking into this again! Thanks! |
When running the tests for the project after building it (with
-DCMAKE_INSTALL_PREFIX=/usr
), the pkgconfig file is rendered with/usr/local/include
instead of/usr/include
.What is the issue you have?
When building and running the tests, the
CMAKE_INSTALL_PREFIX
is not honored when creating the pkgconfig integration.Please describe the steps to reproduce the issue.
The pkgconfig integration will contain
/usr/local/include
, but should include/usr/include
.When building without tests,
CMAKE_INSTALL_PREFIX
is honored and the pkgconfig file contains/usr/include
:Can you provide a small but working code example?
n/a
What is the expected behavior?
CMAKE_INSTALL_PREFIX
is always honored. Tests never influence the installed files.And what is the actual behavior instead?
CMAKE_INSTALL_PREFIX
is not honored if tests are run. Running tests influences the installed files.Which compiler and operating system are you using?
Which version of the library did you use?
develop
branchIf you experience a compilation error: can you compile and run the unit tests?
The text was updated successfully, but these errors were encountered: