Compare commits

..

No commits in common. "b32c5cb81a965fbd7ed2bd2aef3db2bc0d580bbe" and "7772ef634668c669addaa439e03ceb874d8f505b" have entirely different histories.

6 changed files with 16 additions and 13 deletions

1
.gitignore vendored
View File

@ -11,4 +11,3 @@ __pycache__/
/main.cxx /main.cxx
/build /build
/poetry.lock

View File

@ -1,3 +1,3 @@
from .values import * from .lib.values import *
from .cmake import * from .lib.cmake import *
from .tools import * from .lib.tools import *

View File

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

View File

@ -1,5 +1,6 @@
from .tools import * from .tools import *
from .values import * from .values import *
class cmake: class cmake:
__write_stack:"list[str]" = [] __write_stack:"list[str]" = []
__file_name = "" __file_name = ""
@ -56,7 +57,3 @@ class cmake:
def file(self,new_var_name:"str",mode:"str"=glob_recurse,*search_str:"str")->"cmake": def file(self,new_var_name:"str",mode:"str"=glob_recurse,*search_str:"str")->"cmake":
self.__write_stack.append(f"file({mode} {new_var_name} {args_to_str(search_str)})") self.__write_stack.append(f"file({mode} {new_var_name} {args_to_str(search_str)})")
return self return self
def add_subdirectory(self,path:str)->'cmake':
self.__write_stack.append(f"add_subdirectory({path})")
return self

View File

@ -1,4 +1,4 @@
cmake_export_compile_commands = "CMAKE_EXPORT_COMPILE_COMMANDS" cmake_export_compile_cmmands = "CMAKE_EXPORT_COMPILE_COMMANDS"
project_name="PROJECT_NAME" project_name="PROJECT_NAME"
public = "PUBLIC" public = "PUBLIC"
static = "STATIC" static = "STATIC"
@ -14,4 +14,3 @@ o2 = "-O2"
cmake_cxx_flags_release = "CMAKE_CXX_FLAGS_RELEASE" cmake_cxx_flags_release = "CMAKE_CXX_FLAGS_RELEASE"
cmake_cxx_flags_debug = "CMAKE_CXX_FLAGS_DEBUG" cmake_cxx_flags_debug = "CMAKE_CXX_FLAGS_DEBUG"
on="ON" on="ON"
project_source_dir = "PROJECT_SOURCE_DIR"