[BUG]: The main repository and submodule both have source code dependencies on the usage of pybind11
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
What version (or hash if on master) of pybind11 are you using?
stable branches
Problem description
Reproduce by files uploading
Problem
When the main repo and the submodule repo also depends the pybind11 in source code way, the command pybind11_add_module in cmakelists.txt of main repo will
- use the function defined in
test_pybind11/third-party/sub/third-party/pybind11/tools/pybind11Tools.cmake - not the expected definition in
test_pybind11/third-party/pybind11/tools/pybind11Tools.cmake
How to proof this problem is exist?
I have deleted this two files the pybind11 in test_pybind11/third-party/pybind11:
deleted: tools/pybind11NewTools.cmake
deleted: tools/pybind11Tools.cmake
But I still can build the repo successfully by
mkdir build
cd build
cmake ..
make
Reproducible example code
code is here: https://github.com/HRXWEB/test_pybind11
Is this a regression? Put the last known working version here if it is.
Not a regression
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked test_pybind11 repository and inspect its main CMakeLists.txt plus test_pybind11/third-party/pybind11/tools/pybind11Tools.cmake and the nested submodule copy. Reproduce from a clean build with cmake .. and make, then verify which pybind11_add_module definition is selected after the main copy's tool files are removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100