This moves most of the circt-lec code into a CIRCT library. No existing library directories seemed appropriate, hence the addition of the Verification directories.
---------
Co-authored-by: frog-in-the-well <106834163+frog-in-the-well@users.noreply.github.com>
Ensure that during installation we produce a `CIRCTTargets.cmake` file
to allow out-of-tree users to link against CIRCT more easily. This
requires adding an `install(TARGETS ...)` command to
`add_circt_library_install`, and an `install(EXPORT CIRCTTargets ...)`
to `cmake/modules/CMakeLists.txt`.
Update the `cmake/modules/CMakeLists.txt` file and friends such that the
config file also includes the `CIRCT_TOOLS_BINARY_DIR` variable, and the
generation of that file resembles that in MLIR more closely. This should
make it easier in the future to use some of LLVM's cmake utilities.
Add the `CIRCTConfig.cmake` and `AddCIRCT.cmake` files to the list of
installed files. This mimics the behaviour implemented in MLIR, and
allows for CIRCT to be used out of tree (e.g. as part of the Moore
compiler, among other things).
Generally speaking, this should allow
cake -DCIRCT_DIR="<something>/lib/cmake/circt" myprojectdirectory, where <something> is
either a build or install area. Then in your project cmake file you can have:
find_package(CIRCT REQUIRED CONFIG)
This also updates the README to include some building information.
Lots of caveats:
- This is all experimental
- The actual tool isn't interesting yet.
- The naming is arbitrary and will likely change.
- Much of the cmake files were cargo culted from other places
because I don't know what I'm doing.