diff --git a/.gitignore b/.gitignore index fee0fbb..2eb1730 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,10 @@ # Ignore all __pycache__ directories in the project __pycache__/ -/.vscode \ No newline at end of file +/.vscode + +/CMakeLists.txt + +/main.cxx + +/build \ No newline at end of file diff --git a/pymake/__main__.py b/pymake/__main__.py new file mode 100644 index 0000000..09708a4 --- /dev/null +++ b/pymake/__main__.py @@ -0,0 +1,9 @@ +from . import * + +( + cmake("3.5") + .project("test") + .file("SRC",glob_recurse,"*.cxx") + .add_executable(var(project_name),var("SRC")) + .write() +) \ No newline at end of file diff --git a/pymake/lib/tools.py b/pymake/lib/tools.py index 5704240..eb957da 100644 --- a/pymake/lib/tools.py +++ b/pymake/lib/tools.py @@ -1,7 +1,8 @@ -def var(name:"str")->"str": +from typing import * +def var(name:str)->str: return f"${{{name}}}" -def args_to_str(args:"list[str]")->str: +def args_to_str(args:list[str])->str: vars_str = "" for i in args: vars_str=f"{vars_str} {i}"