Skip to content

[BUG] Possible issue loading pybind11 as submodule twice #2800

@henryiii

Description

@henryiii

This came up on the CMake issue tracker; pybind11 might not support being loaded twice. For example, if you have two submodules, and they both load pybind11, then they interfere (and, glancing at the code, I think this is will not work currently because we create the first target or two without checking for existence). To properly test, we ideally should put loads into two directories, since directory-wide variables need to be reloaded (targets should be global and should not be recreated).

Reported by @dmikushin in https://gitlab.kitware.com/cmake/cmake/-/issues/16414#note_886491

I think we support it in Config mode, but not in submodule mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions