Skip to content

Commit cc3e255

Browse files
committed
Add Hidden Attribure
1 parent 7734aa1 commit cc3e255

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cppython/plugins/cmake/builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def generate_provider_preset(provider_data: CMakeSyncData) -> CMakePresets:
1919
provider_directory: The base directory to place the preset files
2020
provider_data: The providers synchronization data
2121
"""
22-
generated_configure_preset = ConfigurePreset(name=provider_data.provider_name)
22+
generated_configure_preset = ConfigurePreset(name=provider_data.provider_name, hidden=True)
2323

2424
# Toss in that sync data from the provider
2525
generated_configure_preset.cacheVariables = {
@@ -67,7 +67,7 @@ def generate_cppython_preset(
6767
Returns:
6868
A CMakePresets object
6969
"""
70-
generated_configure_preset = ConfigurePreset(name='cppython', inherits=provider_data.provider_name)
70+
generated_configure_preset = ConfigurePreset(name='cppython', inherits=provider_data.provider_name, hidden=True)
7171
generated_preset = CMakePresets(configurePresets=[generated_configure_preset])
7272

7373
# Get the relative path to the provider preset file

cppython/plugins/cmake/schema.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ class ConfigurePreset(CPPythonModel, extra='allow'):
4747
"""Partial Configure Preset specification to allow cache variable injection"""
4848

4949
name: str
50+
hidden: Annotated[bool | None, Field(description='If true, the preset is hidden and cannot be used directly.')] = (
51+
None
52+
)
53+
5054
inherits: Annotated[
5155
str | list[str] | None, Field(description='The inherits field allows inheriting from other presets.')
5256
] = None

0 commit comments

Comments
 (0)