Hi all, I just tried testing out Ninja Multi-Config for the first time on Windows. My project has worked with both the Ninja and Visual Studio 19 generators before without issue.
I have successfully built LLVM 10.0.0 and configured Halide against it. Unfortunately, running cmake --build . --config Release sends CMake into an infinite loop of re-running CMake, and it never even has a chance to start the build. Is this a known bug in Halide?
Oh… I think it might be an issue on my end. I cloned the repo while my computer was in UTC mode (I spend most of my time on Linux and rarely boot into Windows) but the build files have been generated after Windows set the correct time zone, leading to Ninja always thinking the source files have changed. I’ll see if re-cloning the repository helps.
C:\Users\kyle.edwards\development\halide\src\src\LLVM_Headers.h(28): fatal error C1083: Cannot open include file: 'llvm/ExecutionEngine/JITEventListener.h': No such file or directory
That would be the issue. LLVM isn’t really usable until it’s been installed somewhere. Try cmake --install . --prefix D:\llvm-install (for instance) and then set LLVM_DIR=D:\llvm-install\lib\cmake\llvm.
Also, LLVM’s Clang package is broken (missing ClangConfigVersion.cmake), so you need to set LLVM_DIR instead of CMAKE_PREFIX_PATH / CMAKE_MODULE_PATH. Various package managers seem to fix this somehow on their own (eg. Ubuntu and vcpkg)
OK, trying that now… and if the build tree for LLVM doesn’t work, someone should probably let the LLVM team know about that. If the build tree exports an LLVMConfig.cmake file, we’d expect it to work like the install file.
One thing that would greatly help here is if you can create a minimal example that reproduces this. I would like to use it as a test case for the bugfix.