diff --git a/reference/commands/config.rst b/reference/commands/config.rst index 70f791a3380d..6b0e856ec576 100644 --- a/reference/commands/config.rst +++ b/reference/commands/config.rst @@ -232,7 +232,6 @@ Displays all the Conan built-in configurations. There are 2 groups: tools.build:skip_test: Do not execute CMake.test() and Meson.test() when enabled tools.build:sysroot: Pass the --sysroot= flag if available. (None by default) tools.cmake.cmake_layout:build_folder_vars: Settings and Options that will produce a different build folder and different CMake presets names - tools.cmake.cmaketoolchain.presets:max_schema_version: Generate CMakeUserPreset.json compatible with the supplied schema version tools.cmake.cmaketoolchain:find_package_prefer_config: Argument for the CMAKE_FIND_PACKAGE_PREFER_CONFIG tools.cmake.cmaketoolchain:generator: User defined CMake generator to use instead of default tools.cmake.cmaketoolchain:system_name: Define CMAKE_SYSTEM_NAME in CMakeToolchain diff --git a/reference/config_files/global_conf.rst b/reference/config_files/global_conf.rst index 5c621a60e8a8..84d6993406f1 100644 --- a/reference/config_files/global_conf.rst +++ b/reference/config_files/global_conf.rst @@ -75,7 +75,6 @@ To list all the possible configurations available, run :command:`conan config li tools.build:skip_test: Do not execute CMake.test() and Meson.test() when enabled tools.build:sysroot: Pass the --sysroot= flag if available. (None by default) tools.cmake.cmake_layout:build_folder_vars: Settings and Options that will produce a different build folder and different CMake presets names - tools.cmake.cmaketoolchain.presets:max_schema_version: Generate CMakeUserPreset.json compatible with the supplied schema version tools.cmake.cmaketoolchain:find_package_prefer_config: Argument for the CMAKE_FIND_PACKAGE_PREFER_CONFIG tools.cmake.cmaketoolchain:generator: User defined CMake generator to use instead of default tools.cmake.cmaketoolchain:system_name: Define CMAKE_SYSTEM_NAME in CMakeToolchain diff --git a/reference/tools/cmake/cmaketoolchain.rst b/reference/tools/cmake/cmaketoolchain.rst index 72d83e9a65ed..38366703cb22 100644 --- a/reference/tools/cmake/cmaketoolchain.rst +++ b/reference/tools/cmake/cmaketoolchain.rst @@ -102,19 +102,11 @@ translated from the current ``settings``: Note: Conan will skip the generation of the ``CMakeUserPresets.json`` if it already exists and was not generated by Conan. +.. note:: -By default, the version schema of the generated ``CMakeUserPresets.json`` is 4 and the schema for the ``CMakePresets.json`` is 3, -so they require CMake >= 3.23. -You can control the version of the generated ``CMakePresets.json`` and ``CMakeUserPresets.json`` with a :ref:`configuration` -``tools.cmake.cmaketoolchain.presets:max_schema_version``. - -It can be set in the `global.conf`, with `-c` in the :command:`conan install` command, or in a profile. -The minimum accepted value for this conf is ``2``: - -.. code:: bash - - conan install . -c tools.cmake.cmaketoolchain.presets:max_schema_version=2 - + The version schema of the generated ``CMakeUserPresets.json`` is 4 (compatible + with CMake>=3.23) and the schema for the ``CMakePresets.json`` is 3 (compatible with + CMake>=3.21). Customization ------------- @@ -464,7 +456,6 @@ CMakeToolchain is affected by these ``[conf]`` variables: - **tools.cmake.cmaketoolchain:system_processor** is not necessary in most cases and is only used to force-define ``CMAKE_SYSTEM_PROCESSOR``. - **tools.cmake.cmaketoolchain:toolset_arch**: Will add the ``,host=xxx`` specifier in the ``CMAKE_GENERATOR_TOOLSET`` variable of ``conan_toolchain.cmake`` file. - **tools.cmake.cmake_layout:build_folder_vars**: Settings and Options that will produce a different build folder and different CMake presets names. -- **tools.cmake.cmaketoolchain.presets:max_schema_version**: Generate CMakeUserPreset.json compatible with the supplied schema version. - **tools.build:cxxflags** list of extra C++ flags that will be appended to ``CMAKE_CXX_FLAGS_INIT``. - **tools.build:cflags** list of extra of pure C flags that will be appended to ``CMAKE_C_FLAGS_INIT``. - **tools.build:sharedlinkflags** list of extra linker flags that will be appended to ``CMAKE_SHARED_LINKER_FLAGS_INIT``.