circt icon indicating copy to clipboard operation
circt copied to clipboard

[CMake] Installation fails if SLANG_ENABLE_FRONTEND is enabled

Open cepheus69 opened this issue 8 months ago • 13 comments

While I was trying to generate installation of CIRCT with enabled SLANG_ENABLE_FRONTEND option. The installation is failed. I went through the file cmake_install.cmake and found snippets that should be relevant to this question.

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE DIRECTORY FILES "/home/ursa/Projects/circt/build/_deps/fmt-src/include/fmt")
endif()

It looks like an extra piece of error code was generated when installing the header files for the fmt library. The wrong code tries to find the fmt library headers in circt's include path.

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE FILE FILES
    "/home/ursa/Projects/circt/include/fmt/args.h"
    "/home/ursa/Projects/circt/include/fmt/chrono.h"
    "/home/ursa/Projects/circt/include/fmt/color.h"
    "/home/ursa/Projects/circt/include/fmt/compile.h"
    "/home/ursa/Projects/circt/include/fmt/core.h"
    "/home/ursa/Projects/circt/include/fmt/format.h"
    "/home/ursa/Projects/circt/include/fmt/format-inl.h"
    "/home/ursa/Projects/circt/include/fmt/os.h"
    "/home/ursa/Projects/circt/include/fmt/ostream.h"
    "/home/ursa/Projects/circt/include/fmt/printf.h"
    "/home/ursa/Projects/circt/include/fmt/ranges.h"
    "/home/ursa/Projects/circt/include/fmt/std.h"
    "/home/ursa/Projects/circt/include/fmt/xchar.h"
    )
endif()

cepheus69 avatar Jun 16 '24 06:06 cepheus69