Skip to content

Conversation

@1480c1
Copy link
Contributor

@1480c1 1480c1 commented Feb 11, 2025

PROJECT_NAME refers to the most recent project() call, while
CMAKE_PROJECT_NAME refers to the top-most project() call.

In the cases where cpuinfo is installed as a standalone project, this is
perfectly fine and works as intended where the installed pkg-config file
contains libcpuinfo as the name. However, if cpuinfo is used as a
subproject, such as when using FetchContent, the name of the calling
project would be used instead, leading to something like libOuterProject
rather than libcpuinfo.

[`PROJECT_NAME`][1] refers to the most recent `project()` call, while
[`CMAKE_PROJECT_NAME`][2] refers to the top-most `project()` call.

In the cases where cpuinfo is installed as a standalone project, this is
perfectly fine and works as intended where the installed pkg-config file
contains libcpuinfo as the name. However, if cpuinfo is used as a
subproject, such as when using FetchContent, the name of the calling
project would be used instead, leading to something like libOuterProject
rather than libcpuinfo.

[1]: https://cmake.org/cmake/help/latest/variable/PROJECT_NAME.html#variable:PROJECT_NAME
[2]: https://cmake.org/cmake/help/latest/variable/CMAKE_PROJECT_NAME.html#variable:CMAKE_PROJECT_NAME

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
@facebook-github-bot
Copy link
Contributor

Hi @1480c1!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@digantdesai
Copy link
Contributor

@1480c1 - Thanks for the fix. Please sign CLA before we can move forward.

@1480c1
Copy link
Contributor Author

1480c1 commented Feb 13, 2025

@1480c1 - Thanks for the fix. Please sign CLA before we can move forward.

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

Based on the bot's response, I believe I have?

@digantdesai digantdesai merged commit b73ae6c into pytorch:main Feb 19, 2025
10 of 12 checks passed
@1480c1 1480c1 deleted the pkg-config-name branch March 21, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants