@@ -152,14 +152,6 @@ def get_options(project_path: Path | PurePosixPath, *, test: bool = False):
152152 ]) # fmt: skip
153153
154154 common_cmake_options = ([
155- StringConfigOption ("minimum_version" ,
156- "Minimum required CMake version. Used for policies "
157- "in the automatically generated CMake cache pre-"
158- "load files. If this version is not available in "
159- "the system PATH, it will be installed "
160- "automatically as a build dependency (using Pip)." ,
161- "minimum_version = \" 3.18\" " ,
162- default = DefaultValueValue (CMAKE_MINIMUM_REQUIRED )),
163155 StringConfigOption ("maximum_policy" ,
164156 "Maximum supported CMake version to use for "
165157 "policies in the automatically generated CMake "
@@ -360,7 +352,17 @@ def order_cmake_options(option: ConfigOption):
360352 "Defines options for the CMake build under Conan." ,
361353 default = DefaultValueValue ({})),
362354 ) # fmt: skip
363- conan_cmake .insert_multiple (sorted (common_cmake_options , key = order_cmake_options ))
355+ conan_cmake_options = [* common_cmake_options ,
356+ StringConfigOption ("minimum_version" ,
357+ "Minimum required CMake version. Used for policies "
358+ "in the automatically generated CMake cache pre-"
359+ "load files. If this version is not available in "
360+ "the system PATH, it will be installed "
361+ "automatically as a build dependency (using Conan)." ,
362+ "minimum_version = \" 3.18\" " ,
363+ default = DefaultValueValue (CMAKE_MINIMUM_REQUIRED )),
364+ ] # fmt: skip
365+ conan_cmake .insert_multiple (sorted (conan_cmake_options , key = order_cmake_options ))
364366
365367 # [tool.py-build-cmake.cmake]
366368 cmake = pbc .insert (
@@ -373,6 +375,14 @@ def order_cmake_options(option: ConfigOption):
373375 )) # fmt: skip
374376 cmake_pth = ConfPath .from_string ("pyproject.toml/tool/py-build-cmake/cmake" )
375377 cmake_options = [* common_cmake_options ,
378+ StringConfigOption ("minimum_version" ,
379+ "Minimum required CMake version. Used for policies "
380+ "in the automatically generated CMake cache pre-"
381+ "load files. If this version is not available in "
382+ "the system PATH, it will be installed "
383+ "automatically as a build dependency (using Pip)." ,
384+ "minimum_version = \" 3.18\" " ,
385+ default = DefaultValueValue (CMAKE_MINIMUM_REQUIRED )),
376386 PathConfigOption ("build_path" ,
377387 "CMake build and cache folder. The placeholder "
378388 "`{build_config}` can be used to insert the name of "
0 commit comments