Skip to content

How can I use precompiled headers with nanobind? #960

Discussion options

You must be logged in to vote

Using the above cmakelist last 4 commands and the code below, helps to reduce build time in my code more than twice:

  $ pip install nanobind scikit-build-core[pyproject]
  $ conda install cmake
  $ pip install --no-build-isolation -ve .
  $ pip install --no-build-isolation -ve . -Ceditable.rebuild=true

I see that stdafx.h is compiled only when code is changed in that file.

More about this topic and why it is relevant:
https://youtu.be/eSI4wctZUto?feature=shared

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@wjakob
Comment options

@petrasvestartas
Comment options

Answer selected by petrasvestartas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants