This commit is contained in:
ZtRXR 2024-04-12 23:59:18 +08:00
parent 8d97e53419
commit 9fbb0b8d29
3 changed files with 19 additions and 3 deletions

6
.gitignore vendored
View File

@ -5,3 +5,9 @@
__pycache__/
/.vscode
/CMakeLists.txt
/main.cxx
/build

9
pymake/__main__.py Normal file
View File

@ -0,0 +1,9 @@
from . import *
(
cmake("3.5")
.project("test")
.file("SRC",glob_recurse,"*.cxx")
.add_executable(var(project_name),var("SRC"))
.write()
)

View File

@ -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}"