-
Notifications
You must be signed in to change notification settings - Fork 42
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
Update CMake paths for dependent package use #478
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #478 +/- ##
========================================
Coverage 97.21% 97.22%
========================================
Files 141 142 +1
Lines 16280 16420 +140
========================================
+ Hits 15827 15964 +137
- Misses 453 456 +3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unblocks LGPU updates. Thanks a lot @mlxd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Only left one suggestions.
@@ -21,6 +21,9 @@ | |||
|
|||
### Bug fixes | |||
|
|||
* Update the CMake internal references to enable sub-project compilation with affecting the parent package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know why you did it, but I'm not getting what you meant by "with affecting the parent package.".
Could you maybe rephrase that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a hastily written message indeed. Let's push ahead for the GPU fixes, and I'll make it better for release
Before submitting
Please complete the following checklist when submitting a PR:
All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to the
tests
directory!All new functions and code must be clearly commented and documented.
If you do make documentation changes, make sure that the docs build and
render correctly by running
make docs
.Ensure that the test suite passes, by running
make test
.Add a new entry to the
.github/CHANGELOG.md
file, summarizing thechange, and including a link back to the PR.
Ensure that code is properly formatted by running
make format
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Context: Currently the new package design assumes that all use will be internal to the nested projects. This however prevents packages depending on Lightning, for example through the CMake FetchContent utility, as source directories are assumed to be top-level of the outer package only. This PR updates all Lightning CMake references from
CMAKE_SOURCE_DIR
topennylane_lightning_SOURCE_DIR
, as discussed by https://cmake.org/cmake/help/v3.27/command/project.html#command:projectDescription of the Change: As above.
Benefits: Allows the repo to be used as a sub-package with CMake.
Possible Drawbacks:
Related GitHub Issues: