3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-01 14:47:53 +00:00

Migrate build system to CMake

See #5895 for details.

This commit does not include CI or documentation changes.
This commit is contained in:
Catherine 2026-05-12 05:33:04 +00:00
parent 9d0cdb8551
commit 9b087b4aa7
207 changed files with 5202 additions and 2294 deletions

29
pyosys/CMakeLists.txt Normal file
View file

@ -0,0 +1,29 @@
add_custom_command(
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/generator.py
${CMAKE_CURRENT_SOURCE_DIR}/wrappers_tpl.cc
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/wrappers.cc
${CMAKE_CURRENT_BINARY_DIR}/wrappers.inc.cc
DEPFILE
${CMAKE_CURRENT_BINARY_DIR}/wrappers.cc.d
COMMAND
${CMAKE_COMMAND} -E env
CCACHE=${CMAKE_CXX_COMPILER_LAUNCHER}
CXX=${CMAKE_CXX_COMPILER}
CXX_STD=c++${CMAKE_CXX_STANDARD}
-- ${PyosysEnv_PYTHON}
${CMAKE_CURRENT_SOURCE_DIR}/generator.py
${CMAKE_CURRENT_BINARY_DIR}/wrappers.cc
--build-dir ${CMAKE_BINARY_DIR}
VERBATIM
COMMENT "Generating Python wrappers"
)
yosys_core(pyosys
wrappers.cc
INCLUDE_DIRS
${pybind11_INCLUDE_DIR}
LIBRARIES
$<${YOSYS_ENABLE_PYTHON}:Python3::Python>
ESSENTIAL
)