Skip to content
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

Compatibility with CMake? #89

Open
adamryczkowski opened this issue May 25, 2023 · 1 comment
Open

Compatibility with CMake? #89

adamryczkowski opened this issue May 25, 2023 · 1 comment

Comments

@adamryczkowski
Copy link

Hi!

We have a medium-sized CMake C++ project which we want to package as a Python module. After some research, I've concluded that cmake_build_extension is the favorite choice.

Is there any chance of using cppimport with it? It seems as if it ignored the CMakeLists.txt altogether, e.g. causing missing header errors.

I am happy to invest some of my time into making this functionality, but I will need some guidence.

@tbenthompson
Copy link
Owner

So far, cppimport is typically used with small/quick/prototype Python extensions that don't have a pre-existing build system. There is no support for CMake at the moment. What are you hoping to get out of cppimport that CMake doesn't already provide you?

You can see the current build system code here: https://github.com/tbenthompson/cppimport/blob/main/cppimport/build_module.py
It uses the setuptools.Extension class. This is performing the same function that CMake would.

If you're interested, I would be love to hear thoughts on how to integrate pre-existing build systems (like CMake) with cppimport. I would guess that we would need to implement some kind of build configuration detector or include configuration information in the cppimport <% %> section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants