Just a simple example of how to properly link to LLVM with CMake. It uses Hunter to automatically compile packages to the HUNTER_ROOT if they are not already there.
- Visual Studio 2019 or a C++14 compiler that can build LLVM.
- CMake 3.15
NOTE: On Windows you need to enable long paths to compile the LLVM package with Hunter:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000001
You will then need to reboot your machine for the changes to take effect.
cmake -B build
cmake --build build