Compare commits
No commits in common. "598816df1222de56467412a3f9b44583c4e852eb" and "c8dcc07d7d710b9109bde009ccb0b82306e2d284" have entirely different histories.
598816df12
...
c8dcc07d7d
|
@ -12,9 +12,43 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS True)
|
||||||
set(BASE_COMPILE_FLAGS "-ffreestanding -fno-rtti -fno-exceptions -mgeneral-regs-only")
|
set(BASE_COMPILE_FLAGS "-ffreestanding -fno-rtti -fno-exceptions -mgeneral-regs-only")
|
||||||
set(BASE_LINK_FLAGS "-nostdlib")
|
set(BASE_LINK_FLAGS "-nostdlib")
|
||||||
|
|
||||||
|
set(PYTHON "${CMAKE_SOURCE_DIR}/yunq/venv/bin/python")
|
||||||
|
set(YUNQ "${CMAKE_SOURCE_DIR}/yunq/yunq.py")
|
||||||
|
|
||||||
|
macro(yunq_gen dir include_dir name)
|
||||||
|
set(file_bundle ${name}_yunq_files)
|
||||||
|
set(target ${name}_yunq)
|
||||||
|
set(${file_bundle}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${name}.yunq.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${name}.yunq.client.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${name}.yunq.server.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(${target}
|
||||||
|
${${file_bundle}}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${target}
|
||||||
|
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/${include_dir}"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(${target}
|
||||||
|
mammoth
|
||||||
|
)
|
||||||
|
set_target_properties(${target} PROPERTIES
|
||||||
|
COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${BASE_COMPILE_FLAGS}"
|
||||||
|
LINK_FLAGS "${CMAKE_EXE_LINK_FLAGS} ${BASE_LINK_FLAGS}"
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${${file_bundle}}
|
||||||
|
COMMAND ${PYTHON} ${YUNQ} ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${name}.yunq
|
||||||
|
DEPENDS ${dir}/${name}.yunq
|
||||||
|
)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
add_subdirectory(zion)
|
add_subdirectory(zion)
|
||||||
add_subdirectory(lib)
|
add_subdirectory(lib)
|
||||||
add_subdirectory(yunq)
|
|
||||||
add_subdirectory(sys)
|
add_subdirectory(sys)
|
||||||
|
|
||||||
# Use machine q35 to access PCI devices.
|
# Use machine q35 to access PCI devices.
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
set(PYTHON "${CMAKE_SOURCE_DIR}/yunq/venv/bin/python")
|
|
||||||
set(YUNQ "${CMAKE_SOURCE_DIR}/yunq/yunq.py")
|
|
||||||
|
|
||||||
macro(yunq_gen dir include_dir name)
|
|
||||||
set(file_bundle ${name}_yunq_files)
|
|
||||||
set(target ${name}_yunq)
|
|
||||||
set(${file_bundle}
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${name}.yunq.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${name}.yunq.client.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${name}.yunq.server.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(${target}
|
|
||||||
${${file_bundle}}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(${target}
|
|
||||||
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/${include_dir}"
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(${target}
|
|
||||||
mammoth
|
|
||||||
)
|
|
||||||
set_target_properties(${target} PROPERTIES
|
|
||||||
COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${BASE_COMPILE_FLAGS}"
|
|
||||||
LINK_FLAGS "${CMAKE_EXE_LINK_FLAGS} ${BASE_LINK_FLAGS}"
|
|
||||||
)
|
|
||||||
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT ${${file_bundle}}
|
|
||||||
COMMAND ${PYTHON} ${YUNQ} ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${name}.yunq
|
|
||||||
DEPENDS ${dir}/${name}.yunq
|
|
||||||
)
|
|
||||||
endmacro()
|
|
Loading…
Reference in New Issue