Skip to content

Commit bebd85d

Browse files
committed
Remove CPPython Preset Includes
1 parent 521e15e commit bebd85d

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

cppython/plugins/cmake/builder.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,17 @@ def generate_cppython_preset(
4040
name=preset_name,
4141
hidden=True,
4242
description='Injected configuration preset for CPPython',
43-
toolchainFile=provider_data.toolchain_file,
4443
)
44+
45+
if provider_data.toolchain_file:
46+
default_configure.toolchainFile = provider_data.toolchain_file.as_posix()
47+
4548
configure_presets.append(default_configure)
4649

4750
generated_preset = CMakePresets(
4851
configurePresets=configure_presets,
4952
)
5053

51-
# Get the relative path to the provider preset file
52-
relative_preset = provider_preset_file.relative_to(cppython_preset_directory, walk_up=True).as_posix()
53-
54-
# Set the data
55-
generated_preset.include = [relative_preset]
5654
return generated_preset
5755

5856
@staticmethod
@@ -114,7 +112,6 @@ def _create_presets(
114112
ConfigurePreset(
115113
name=name,
116114
description='All multi-configuration generators should inherit from this preset',
117-
hidden=True,
118115
inherits='cppython',
119116
binaryDir='${sourceDir}/' + build_directory.as_posix(),
120117
cacheVariables={'CMAKE_CONFIGURATION_TYPES': 'Debug;Release'},
@@ -125,7 +122,6 @@ def _create_presets(
125122
ConfigurePreset(
126123
name=release_name,
127124
description='All single-configuration generators should inherit from this preset',
128-
hidden=True,
129125
inherits=name,
130126
cacheVariables={'CMAKE_BUILD_TYPE': 'Release'},
131127
)
@@ -135,7 +131,6 @@ def _create_presets(
135131
ConfigurePreset(
136132
name=debug_name,
137133
description='All single-configuration generators should inherit from this preset',
138-
hidden=True,
139134
inherits=name,
140135
cacheVariables={'CMAKE_BUILD_TYPE': 'Debug'},
141136
)
@@ -145,7 +140,6 @@ def _create_presets(
145140
BuildPreset(
146141
name=release_name,
147142
description='An example build preset for release',
148-
hidden=True,
149143
configurePreset=release_name,
150144
)
151145
)
@@ -154,7 +148,6 @@ def _create_presets(
154148
BuildPreset(
155149
name=debug_name,
156150
description='An example build preset for debug',
157-
hidden=True,
158151
configurePreset=debug_name,
159152
)
160153
)

0 commit comments

Comments
 (0)