-
Notifications
You must be signed in to change notification settings - Fork 143
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: Fix generation with multiple repos #1140
Conversation
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 don't know much about CMake, so thanks for improving it!
@@ -164,6 +162,8 @@ set({{ name | upper }}{{ "_" ~ (profile | upper) if profile | length else "" }} | |||
endfunction() | |||
|
|||
function(modm_targets_create project_name) | |||
find_package (Python3 COMPONENTS Interpreter REQUIRED) |
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.
What's the difference? Does cmake have its own package manager???
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.
Not quite a package manager, just a set of modules to find dependecies.
find_program
fails to find a valid Python executable on my Windows machine and reading the docs it seems to only search a predefined set of paths per platform for a name match.
find_package
in this case will use the FindPython3 module shipped with CMake to find python so it should be more flexible and does find my Python install.
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.
Thank you!
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.
Thank you also from me :)
Make the CMake generator work with projects using multiple repositories, similar to how it works with SCons.
Currently this would generate multiple targets called modm, causing an error.