Skip to content

Commit 33ce0b8

Browse files
committed
test
1 parent 0e1719a commit 33ce0b8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/integration/examples/test_conan_cmake.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
sys.platform != 'win32', reason='C++20 modules require Ninja or Visual Studio generator, not Unix Makefiles.'
2727
)
2828

29+
# On Windows (multi-config generators), use 'default' preset
30+
# On Linux/Mac (single-config generators), use 'default-release' because CMAKE_BUILD_TYPE is required
31+
_cmake_preset = 'default' if sys.platform == 'win32' else 'default-release'
32+
2933

3034
class TestConanCMake:
3135
"""Test project variation of conan and CMake"""
@@ -53,7 +57,7 @@ def _run_cmake_configure(cmake_binary: str) -> None:
5357
Args:
5458
cmake_binary: Path or command name for the CMake binary to use
5559
"""
56-
result = subprocess.run([cmake_binary, '--preset=default'], capture_output=True, text=True, check=False)
60+
result = subprocess.run([cmake_binary, f'--preset={_cmake_preset}'], capture_output=True, text=True, check=False)
5761
assert result.returncode == 0, f'CMake configuration failed: {result.stderr}'
5862

5963
@staticmethod

0 commit comments

Comments
 (0)