add pybind11_add_module
This commit is contained in:
parent
ccfa4ac209
commit
02fec5c637
@ -57,3 +57,11 @@ class cmake:
|
|||||||
def add_subdirectory(self,path:str)->Self:
|
def add_subdirectory(self,path:str)->Self:
|
||||||
self.__write_stack__.append(f"add_subdirectory({path})")
|
self.__write_stack__.append(f"add_subdirectory({path})")
|
||||||
return self
|
return self
|
||||||
|
def pybind11_add_module(self, project_name:str=var(project_name), *source:str)->Self:
|
||||||
|
"""
|
||||||
|
cmake_minimum_required(VERSION 3.5...3.27)
|
||||||
|
project(example LANGUAGES CXX)
|
||||||
|
add_subdirectory(pybind11)
|
||||||
|
pybind11_add_module(example example.cpp)
|
||||||
|
"""
|
||||||
|
self.__write_stack__.append(f"pybind11_add_module({project_name} {args_to_str(source)})")
|
||||||
|
@ -3,5 +3,6 @@ from pymake import cmake
|
|||||||
|
|
||||||
(
|
(
|
||||||
cmake("3.15")
|
cmake("3.15")
|
||||||
|
# TODO
|
||||||
.write()
|
.write()
|
||||||
)
|
)
|
Loading…
Reference in New Issue
Block a user