circt icon indicating copy to clipboard operation
circt copied to clipboard

[ESI][runtime] Make cmake-distributed header include-able

Open mortbopet opened this issue 1 year ago • 1 comments

Currently, https://github.com/llvm/circt/blob/main/lib/Dialect/ESI/runtime/CMakeLists.txt is written in such a way that (i presume) it's expected to be added via add_subdirectory. Instead, I think it would be better to have an esi.cmake file which can be included, or write the CMake support s.t. we can do find_library.

As a minimum, this file needs to be refactored s.t. file-paths are absolute (using ${CMAKE_CURRENT_SORCE_DIR}) and not relative (e.g. set(ESIRuntimeSources cpp/lib/Accelerator.cpp ... -> set(ESIRuntimeSources ${CMAKE_CURRENT_SORCE_DIR}/cpp/lib/Accelerator.cpp).

mortbopet avatar Apr 30 '24 13:04 mortbopet

Partially addressed by https://github.com/llvm/circt/commit/b51a6448d061f3deb48733348e7c0f5204e4cfcd and https://github.com/llvm/circt/commit/474fc3f4a4fc0d9327f9577da5a98ca2f3dd377b. ESI Runtime is now FetchContent-able. I also have a .cmake file which gets installed.

teqdruid avatar May 14 '24 20:05 teqdruid