Issue
I found a tool to generate UML diagrams : https://github.com/bkryza/clang-uml
For CMake projects, simply invoke the cmake command as cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ...
it requires to run
C:\Vs2022\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G "Visual Studio 16 2019"
the idea is that it is supposed to generate a json file
clang-uml requires an up-to-date compile_commands.json file
but I get this error
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.20348.
-- The C compiler identification is MSVC 19.28.29337.0
-- The CXX compiler identification is MSVC 19.28.29337.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Vs2019/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Vs2019/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:26 (find_package):
Could not find a package configuration file provided by "LLVM" with any of
the following names:
LLVMConfig.cmake
llvm-config.cmake
I found a file that resemble it, but I feel I am doing something wrong
- How can I generate that json file ?
thanks for your help
Solution
Part of the project was missing. After having installed the correct version of LLVM (older version than the one installed), I could make it work.
Details: a build script was supposed to run and clone the llvm repo/building it. This is what happens when you pickup a project with no handover
Answered By - pf12345678910 Answer Checked By - David Marino (WPSolving Volunteer)