From cb69c456a3d118a9509e3c45c52a761d2850bfeb Mon Sep 17 00:00:00 2001 From: James Date: Wed, 1 Jun 2022 17:21:58 +0200 Subject: [PATCH] fix conf typo (#11372) --- conan/tools/cmake/layout.py | 4 ++-- conans/model/conf.py | 2 +- .../toolchains/cmake/test_cmake_toolchain.py | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conan/tools/cmake/layout.py b/conan/tools/cmake/layout.py index d6db12eec46..e792280c2f0 100644 --- a/conan/tools/cmake/layout.py +++ b/conan/tools/cmake/layout.py @@ -44,7 +44,7 @@ def cmake_layout(conanfile, generator=None, src_folder="."): def get_build_folder_vars_suffix(conanfile): - build_vars = conanfile.conf.get("tools.cmake.cmake_layout.build_folder_vars", + build_vars = conanfile.conf.get("tools.cmake.cmake_layout:build_folder_vars", default=[], check_type=list) ret = [] for s in build_vars: @@ -58,7 +58,7 @@ def get_build_folder_vars_suffix(conanfile): if value is not None: tmp = "{}_{}".format(var, value) else: - raise ConanException("Invalid 'tools.cmake.cmake_layout.build_folder_vars' value, it has" + raise ConanException("Invalid 'tools.cmake.cmake_layout:build_folder_vars' value, it has" " to start with 'settings.' or 'options.': {}".format(s)) if tmp: ret.append(tmp.lower()) diff --git a/conans/model/conf.py b/conans/model/conf.py index 27e90fdb773..1c37c95e39c 100644 --- a/conans/model/conf.py +++ b/conans/model/conf.py @@ -22,7 +22,7 @@ "tools.cmake.cmaketoolchain:system_version": "Define CMAKE_SYSTEM_VERSION in CMakeToolchain", "tools.cmake.cmaketoolchain:system_processor": "Define CMAKE_SYSTEM_PROCESSOR in CMakeToolchain", "tools.env.virtualenv:auto_use": "Automatically activate virtualenv file generation", - "tools.cmake.cmake_layout.build_folder_vars": "Settings and Options that will produce a different build folder and different CMake presets names", + "tools.cmake.cmake_layout:build_folder_vars": "Settings and Options that will produce a different build folder and different CMake presets names", "tools.files.download:retry": "Number of retries in case of failure when downloading", "tools.files.download:retry_wait": "Seconds to wait between download attempts", "tools.gnu:make_program": "Indicate path to make program", diff --git a/conans/test/functional/toolchains/cmake/test_cmake_toolchain.py b/conans/test/functional/toolchains/cmake/test_cmake_toolchain.py index fd07e609d90..61bd524ca08 100644 --- a/conans/test/functional/toolchains/cmake/test_cmake_toolchain.py +++ b/conans/test/functional/toolchains/cmake/test_cmake_toolchain.py @@ -524,7 +524,7 @@ def test_cmake_toolchain_runtime_types_cmake_older_than_3_15(): def test_cmake_presets_missing_option(): client = TestClient(path_with_spaces=False) client.run("new hello/0.1 --template=cmake_exe") - settings_layout = '-c tools.cmake.cmake_layout.build_folder_vars=' \ + settings_layout = '-c tools.cmake.cmake_layout:build_folder_vars=' \ '\'["options.missing"]\'' client.run("install . {}".format(settings_layout)) assert os.path.exists(os.path.join(client.current_folder, "build", "generators")) @@ -534,7 +534,7 @@ def test_cmake_presets_missing_option(): def test_cmake_presets_missing_setting(): client = TestClient(path_with_spaces=False) client.run("new hello/0.1 --template=cmake_exe") - settings_layout = '-c tools.cmake.cmake_layout.build_folder_vars=' \ + settings_layout = '-c tools.cmake.cmake_layout:build_folder_vars=' \ '\'["settings.missing"]\'' client.run("install . {}".format(settings_layout)) assert os.path.exists(os.path.join(client.current_folder, "build", "generators")) @@ -544,7 +544,7 @@ def test_cmake_presets_missing_setting(): def test_cmake_presets_multiple_settings_single_config(): client = TestClient(path_with_spaces=False) client.run("new hello/0.1 --template=cmake_exe") - settings_layout = '-c tools.cmake.cmake_layout.build_folder_vars=' \ + settings_layout = '-c tools.cmake.cmake_layout:build_folder_vars=' \ '\'["settings.compiler", "settings.compiler.version", ' \ ' "settings.compiler.cppstd"]\'' @@ -626,7 +626,7 @@ def test_cmake_presets_multiple_settings_single_config(): def test_cmake_presets_options_single_config(): client = TestClient(path_with_spaces=False) client.run("new hello/0.1 --template=cmake_lib") - conf_layout = '-c tools.cmake.cmake_layout.build_folder_vars=\'["settings.compiler", ' \ + conf_layout = '-c tools.cmake.cmake_layout:build_folder_vars=\'["settings.compiler", ' \ '"options.shared"]\'' default_compiler = {"Darwin": "apple-clang", @@ -666,7 +666,7 @@ def test_cmake_presets_options_single_config(): def test_cmake_presets_multiple_settings_multi_config(): client = TestClient(path_with_spaces=False) client.run("new hello/0.1 --template=cmake_exe") - settings_layout = '-c tools.cmake.cmake_layout.build_folder_vars=' \ + settings_layout = '-c tools.cmake.cmake_layout:build_folder_vars=' \ '\'["settings.compiler.runtime", "settings.compiler.cppstd"]\'' user_presets_path = os.path.join(client.current_folder, "CMakeUserPresets.json")