-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
pybind11 cmakedeps #9348
pybind11 cmakedeps #9348
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
0b2f817
to
5f88d7c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
enable_testing() | ||
|
||
add_test(run_example | ||
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test.py ${CMAKE_CURRENT_BINARY_DIR}/lib) |
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.
Use the same project files (CMakeLists.txt
) from test_package
, even if you need some if
to skip the conanbuildinfo.cmake
. It is important to check that both generators use the same find_package
call, same target names,...
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 think that is a good practice:
- Tricking the layout to include a
../test_package/CMakeLists.txt
is very dirty and not something you will do except for this situation. - Introducing an IF in the original
CMakelists.txt
to skip theconanbuildinfo.cmake
would be very very weird, so you edit that file and you are supposed to know that is shared between several test_packages. - When Conan 2.0 is introduced here, we want to remove/rename the test_package folder and it will require extra effort.
- I get that using the same target name is important, and that can be checked in the review of the PR.
Overall I think that code reuse, far from helping, will cause more trouble and dirty code.
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 God it is more or less easy with the layout, just:
def layout(self):
cmake_layout(self)
self.folders.source = os.path.join("..", "test_package")
I find it important, but let's wait for other reviewers, they are the ones that will maintain this recipe and possible inconsistencies between the two files.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I'm pretty sure this is related to #9343 (comment). Is there any news on this PR @jgsogo? 🙂 |
This comment has been minimized.
This comment has been minimized.
Failure in build 6 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I just pulled this locally, and the fix to the CI is simple, in from conan.tools.cross_building import cross_building should be updated to from conan.tools.build.cross_building import cross_building |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions. |
Specify library name and version: pybind11/all
I'm submitting some changes in the properties and including a new
test_package_cmakedeps
to make sure the package is correctly consumed with CMakeDeps.conan-center hook activated.