Skip to content

pip install . generates src/bindings.cpp in the source dir #206

@eminyous

Description

@eminyous

Running pip install . (or any build command) causes CMake's configure_file step to generate src/bindings.cpp directly inside the source tree. This file is a build artifact derived from src/bindings.cpp.in and should not appear in the working directory. In CMakeList.txt

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/bindings.cpp.in
               ${CMAKE_CURRENT_SOURCE_DIR}/src/bindings.cpp)

The output path uses CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_CURRENT_BINARY_DIR, so the generated file lands in the source tree rather than the build directory. Additionally, .gitignore lists src/osqp/bindings.cpp instead of src/bindings.cpp, so the file is not ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions