-
Notifications
You must be signed in to change notification settings - Fork 7k
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
CMake: project() problem (with PROJECT_NAME et al.) in subprojects (IDFGH-1321) #3611
Comments
viettrungluu
changed the title
New CMake project() issue (with PROJECT_NAME et al.)
CMake: project() problem (with PROJECT_NAME et al.) in subprojects
Jun 11, 2019
github-actions
bot
changed the title
CMake: project() problem (with PROJECT_NAME et al.) in subprojects
CMake: project() problem (with PROJECT_NAME et al.) in subprojects (IDFGH-1321)
Jun 11, 2019
Thank you for bringing this to our attention. A fix for this is in the works. |
igrr
pushed a commit
that referenced
this issue
Jul 18, 2019
ESP-IDF overrides project() definition for user convenience. This redefinition lacks setting the variables documented at the project command documentation https://cmake.org/cmake/help/v3.5/command/project.html in the parent scope. This commit sets those variables. Closes #3611.
trombik
pushed a commit
to trombik/esp-idf
that referenced
this issue
Aug 9, 2019
ESP-IDF overrides project() definition for user convenience. This redefinition lacks setting the variables documented at the project command documentation https://cmake.org/cmake/help/v3.5/command/project.html in the parent scope. This commit sets those variables. Closes espressif#3611.
0xFEEDC0DE64
pushed a commit
to 0xFEEDC0DE64/esp-idf
that referenced
this issue
May 5, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
git describe --tags
to find it):[latest version on master] 2c55fae
Problem Description
In CMake, after a
project()
in a subproject (added viaadd_subdirectory()
),PROJECT_NAME
(andPROJECT_VERSION
, etc.) are not set correctly.I'm happy that the newer versions try to restore
project()
; however, something's not right.Suppose you modify the hello_world's top-level CMakeLists.txt to::
and you make a foo/CMakeLists.txt file:
You get
PROJECT_NAME = hello-world
, instead ofPROJECT_NAME = foo
.I'm not sure what's going on, but it can be a problem with third-party code. (E.g., code I'm importing has
write_basic_package_version_file()
(fromCMakePackageConfigHelpers
) failing sincePROJECT_VERSION
isn't defined.)Expected Behavior
See above.
Actual Behavior
See above.
Steps to repropduce
See above.
The text was updated successfully, but these errors were encountered: