Skip to content

Commit

Permalink
fix conf typo (#11372)
Browse files Browse the repository at this point in the history
  • Loading branch information
memsharded authored Jun 1, 2022
1 parent d02459c commit cb69c45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions conan/tools/cmake/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion conans/model/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions conans/test/functional/toolchains/cmake/test_cmake_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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"))
Expand All @@ -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"]\''

Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit cb69c45

Please sign in to comment.