-
Notifications
You must be signed in to change notification settings - Fork 2
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
Split C++ code in 2 separate shared libraries #32
Conversation
96249c0
to
e821712
Compare
I like such kind of separation. |
e821712
to
efb04c0
Compare
Thank you @ferdonline I still need to prevent building the other shared library (the one without bindings) during |
Some python packages put a leading underscore in the lib name if it's not expected to be used standalone. Maybe that's the case here? |
Yes this module provides both Python and native code.
This But I am fine to execute a more precise make target in |
2ea2c7e
to
084b16e
Compare
084b16e
to
2d9f82b
Compare
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'm not following this very closely but I agree 100% with the separation of concepts and the new building rules.
Remove `Basalt_BUILD_PYTHON_PACKAGE` CMake option to choose if the pure C++ library has to be built or the Python bindings. Now CMake builds 2 shared libraries: * `basalt` which contain pure C++ code. * `_basalt`: built by pybind11, and depends on the first. a dirty workaround is required in `basalt/__init__.py` so that Python bindings can find the pure C++ code at runtime. Only build Python bindings during `python setup.py build` to prevent including the pure C++ shared library in Python package.
Configuring CMake so that it creates a JSON file with command line of every translation unit at cmake time. Then this file is given to clang-format so that it has all include directories.
2d9f82b
to
6e57971
Compare
Remove
Basalt_BUILD_PYTHON_PACKAGE
CMake option to choose ifthe pure C++ library has to be built or the Python bindings.
Now CMake builds 2 shared libraries:
basalt
which contain pure C++ code._basalt
: built by pybind11, and depends on the first.a dirty workaround is required in
basalt/__init__.py
so thatPython bindings can find the pure C++ code at runtime.