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
About "add_custom_target(man ALL DEPENDS ${man_MANS})" #13324
Comments
Looks like target names share a common namespace in CMake. If so, an (Renaming targets also rename the generated e.g. Does that make sense? |
And I suppose we also need the |
|
Using unique (prefixed) target names seems to be best practise for libraries. Especially since Dependencies brought in with |
If curl is included in other third-party libraries called in my project, and I also compile curl in my own code, then curl's CMakeLists.txt will be called multiple times. At this point, even if a unique name is used, an error may still occur: "See documentation for policy CMP0002 for more details.". Is there a win-win solution? |
I propose handling the self-duplicate issue separately as it's less clear-cut and also distinct from the namespace one. I don't understand the details of that, which (or a sub-case of it?) also seems to be CMake version dependent based on past issues. Also we don't seem to have any protection for this, yet this hasn't come up in practice. |
Does this patch fix this issue?: (Via #13326) |
Okay, the issue of self repetition is currently only theoretical. |
After verification, this patch has resolved this issue |
Thanks for testing and your feedback. |
I did this
No response
I expected the following
In "curl/docs/libcurl/CMakeLists.txt",can "add_custom_target(man ALL DEPENDS ${man_MANS})" this line add an option to whether to execute or not?Currently conflicting with libzip,the error string is "See documentation for policy CMP0002 for more details.".Change to something similar to the following
if(${xxxxxxx})
add_custom_target(man ALL DEPENDS ${man_MANS})
endif()
curl/libcurl version
8.2.0
operating system
Windows 10
The text was updated successfully, but these errors were encountered: