Files
pybind11/CMakePresets.json
Henry Schreiner 05a6a03e7d chore(cmake): add CMake presets (#5655)
* chore(cmake): add CMake presets

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* Update .github/workflows/ci.yml

* fix: don't autodetect `.venv` if inside a VIRTUALENV already

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* Update CMakeLists.txt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-14 01:29:24 -04:00

81 lines
1.9 KiB
JSON

{
"version": 6,
"configurePresets": [
{
"name": "default",
"displayName": "Default",
"binaryDir": "build",
"generator": "Ninja",
"errors": {
"dev": true,
"deprecated": true
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"PYBIND11_FINDPYTHON": "NEW",
"PYBIND11_WERROR": true,
"DOWNLOAD_CATCH": true,
"DOWNLOAD_EIGEN": true
}
},
{
"name": "venv",
"displayName": "Venv",
"inherits": "default",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"PYBIND11_CREATE_WITH_UV": "python3",
"Python_ROOT_DIR": ".venv",
"PYBIND11_WERROR": true,
"PYBIND11_FINDPYTHON": "NEW",
"DOWNLOAD_CATCH": true,
"DOWNLOAD_EIGEN": true
}
}
],
"buildPresets": [
{
"name": "default",
"displayName": "Default Build",
"configurePreset": "default"
},
{
"name": "venv",
"displayName": "Venv Build",
"configurePreset": "venv"
},
{
"name": "tests",
"displayName": "Tests (for workflow)",
"configurePreset": "default",
"targets": ["pytest", "cpptest", "test_cmake_build"]
},
{
"name": "testsvenv",
"displayName": "Tests Venv (for workflow)",
"configurePreset": "venv",
"targets": ["pytest", "cpptest", "test_cmake_build"]
}
],
"workflowPresets": [
{
"name": "default",
"displayName": "Default Workflow",
"steps": [
{ "type": "configure", "name": "default" },
{ "type": "build", "name": "default" },
{ "type": "build", "name": "tests" }
]
},
{
"name": "venv",
"displayName": "Default Workflow",
"steps": [
{ "type": "configure", "name": "venv" },
{ "type": "build", "name": "venv" },
{ "type": "build", "name": "testsvenv" }
]
}
]
}