Skip to content
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
4 changes: 4 additions & 0 deletions src/cmake/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from cmake import cmake

if __name__ == "__main__":
cmake()
6 changes: 6 additions & 0 deletions tests/test_cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ def test_cmake_script(tool):
assert len(scripts) == 1
output = subprocess.check_output([str(scripts[0]), "--version"]).decode("ascii")
assert output.splitlines()[0] == f"{tool} version {expected_version}"


def test_cmake_main():
expected_version = "3.29.5"
output = subprocess.run([sys.executable, "-m", "cmake", "--version"], text=True, capture_output=True, check=False).stdout
assert output.splitlines()[0] == f"cmake version {expected_version}"