Skip to content

Add scikit-build-core CXX compiler detection when no environment variable is set - #55

Open
mwyau wants to merge 1 commit into
mreineck:ducc0from
mwyau:scikit-build-core-compiler-detect
Open

Add scikit-build-core CXX compiler detection when no environment variable is set#55
mwyau wants to merge 1 commit into
mreineck:ducc0from
mwyau:scikit-build-core-compiler-detect

Conversation

@mwyau

@mwyau mwyau commented Aug 2, 2026

Copy link
Copy Markdown

A new config field to detect compilers instead of using the sysconfig default was added in scikit-build-core 1.0: scikit-build/scikit-build-core#1377

https://scikit-build-core.readthedocs.io/en/latest/configuration/index.html#selecting-a-compiler

By default, scikit-build-core sets CC/CXX from Python’s sysconfig compiler when they are not already set. If a project’s compiler probes break on that compiler (a conda narrow sysroot, a stale venv gcc, a cross or oneAPI toolchain), list the variable in the env table to suppress that default and let CMake detect the compiler from PATH; an entry that reads from the same name does this without pinning a value:

[tool.scikit-build.env]
CC = { env = "CC" }
CXX = { env = "CXX" }
  • Is CC not needed for ducc?
  • This change needs to be tested.

Related issue: #54

@mwyau
mwyau marked this pull request as ready for review August 2, 2026 19:04
@mwyau mwyau changed the title Add scikit-build-core CXX compiler detection from environment variable Add scikit-build-core CXX compiler detection when no environment variable is set Aug 2, 2026
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

Successfully merging this pull request may close these issues.

1 participant