[core] debug yosys version extraction
[core] debug
[core] now cache the cmake source dir
[core] debug
[core] debug kernel dependencies
[core] debug common include directories
[core] debug
[core] debug simlib_help.inc
[core] debug pmgen py path in cmake
[core] syntax
[core] debug flex source
[core] restore
[core] debug executable output as it now shows linking to .
[core] debug yosys-abc directory
[core] debug cmake share directory
[core] debug yosys abc
[core] restore shared directory location as yosys requires fixed location
[core] rework link target to yosys sub dir under build
[core] fixed the bug on yosys-config.install location for install
[core] cmake syntax
[core] correct the location for share directory
[core] debug
[core] debug
[core] debug
[core] enforce internal attributes; rename the YOSYS_ENABLE_UNIT_TESTS; use YOSYS_CMAKE_BINARY_DIR for all
[core] apply review comments
[core] rename
[core] change all the CMAKE_BINARY_DIR to YOSYS_CMAKE_BINARY_DIR
[core] replace CMAKE_SOURCE_DIR to YOSYS_CMAKE_SOURCE_DIR
The current version of UseHomebrew defaults to /opt/homebrew/Cellar and prioritizes it over anything currently existing in PATH. This has two issues:
- On x86_64 installations of Homebrew (including when emulating on ARM), the path is /usr/local/Cellar
- When building in a `nix develop` environment, the homebrew versions take priority, complicating testing
This addresses this issue by using the output of `brew --prefix`, doing nothing if brew is not in `PATH`.
Additionally, CMakeLists.txt was updated such that if YOSYS_ENABLE_HOMEBREW is defined as OFF, using Homebrew is skipped entirely.
Homebrew doesn't provide a merged (FHS) prefix and tools installed from
it cannot be expected to appear on PATH. Furthermore, XCode provides
some tools and headers (Flex, Bison) which must not be used if
a Homebrew alternative is installed.
This change uses the `find_program(VALIDATOR)` functionality available
since CMake 3.25 to find the acceptable Bison executable instead of
failing if the first one found is too old. (macOS ships with Bison 2.6.)
This change also explicitly finds a usable M4 and ensures the Bison
command will use it. (macOS ships with an m4 which can fail if XCode
Tools aren't installed.)
Make explicit the location for the `CMakeUserPresets.json` file.
Update docs tests documentation.
Move `BUILD_DIR` and `PROGRAM_PREFIX` comments into the functional tests todo.
Add cmake to MacPorts/FreeBSD install instructions.
Add ccache to example `CMakeUserPresets.json` (it isn't otherwise documented, and is no longer as obvious without an `ENABLE_CCACHE` makevar).
Addressing comments
This commit reimplements the (no longer recommended) setuptools based
build system using a standards-based in-tree PEP517 build backend.
The implementation is partially based on
https://codeberg.org/ziglang/zig-pypi/src/branch/main/make_wheels.py
which is licensed under BSD-0-clause.
It also adds a new option `YOSYS_BUILD_PYTHON_ONLY` that is available
only if the binary or the library aren't going to be installed, which
turns off these targets entirely, as well as some dependent ones
(e.g. tests).
Co-authored-by: Mohamed Gaber <[email protected]>