Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy schema support #3049

Merged
merged 1 commit into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion reference/commands/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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=<tools.build: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
Expand Down
1 change: 0 additions & 1 deletion reference/config_files/global_conf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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=<tools.build: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
Expand Down
17 changes: 4 additions & 13 deletions reference/tools/cmake/cmaketoolchain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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<conan-cmake-toolchain_conf>`
``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
-------------
Expand Down Expand Up @@ -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``.
Expand Down