Compare commits
4 Commits
7772ef6346
...
b32c5cb81a
Author | SHA1 | Date | |
---|---|---|---|
b32c5cb81a | |||
08d48316b6 | |||
37b97de5e6 | |||
d4ad54915b |
3
.gitignore
vendored
3
.gitignore
vendored
@ -10,4 +10,5 @@ __pycache__/
|
|||||||
|
|
||||||
/main.cxx
|
/main.cxx
|
||||||
|
|
||||||
/build
|
/build
|
||||||
|
/poetry.lock
|
@ -1,3 +1,3 @@
|
|||||||
from .lib.values import *
|
from .values import *
|
||||||
from .lib.cmake import *
|
from .cmake import *
|
||||||
from .lib.tools import *
|
from .tools import *
|
@ -1,9 +1 @@
|
|||||||
from . import *
|
print("Hello from pymake")
|
||||||
|
|
||||||
(
|
|
||||||
cmake("3.5")
|
|
||||||
.project("test")
|
|
||||||
.file("SRC",glob_recurse,"*.cxx")
|
|
||||||
.add_executable(var(project_name),var("SRC"))
|
|
||||||
.write()
|
|
||||||
)
|
|
@ -1,6 +1,5 @@
|
|||||||
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,4 +55,8 @@ 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
|
||||||
|
|
||||||
|
def add_subdirectory(self,path:str)->'cmake':
|
||||||
|
self.__write_stack.append(f"add_subdirectory({path})")
|
||||||
return self
|
return self
|
@ -1,4 +1,4 @@
|
|||||||
cmake_export_compile_cmmands = "CMAKE_EXPORT_COMPILE_COMMANDS"
|
cmake_export_compile_commands = "CMAKE_EXPORT_COMPILE_COMMANDS"
|
||||||
project_name="PROJECT_NAME"
|
project_name="PROJECT_NAME"
|
||||||
public = "PUBLIC"
|
public = "PUBLIC"
|
||||||
static = "STATIC"
|
static = "STATIC"
|
||||||
@ -13,4 +13,5 @@ o3 = "-O3"
|
|||||||
o2 = "-O2"
|
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"
|
Loading…
Reference in New Issue
Block a user