
Include_directories(SYSTEM "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/6/include") Include_directories(SYSTEM "C:/Program Files (x86)/Windows Kits/10/Include/8.0/cppwinrt") Include_directories(SYSTEM "C:/Program Files (x86)/Windows Kits/10/Include/8.0/winrt") Include_directories(SYSTEM "C:/Program Files (x86)/Windows Kits/10/Include/8.0/um") Include_directories(SYSTEM "C:/Program Files (x86)/Windows Kits/10/Include/8.0/shared") Include_directories(SYSTEM "C:/Program Files (x86)/Windows Kits/10/Include/8.0/ucrt") Set(MDMERGE_TOOL "C:/Program Files (x86)/Windows Kits/10/bin/8.0/圆4/mdmerge.exe") Set(LLVM_TARGET_ARCH "x86_64" CACHE STRING "" FORCE) Set(LLVM_NATIVE_ARCH "x86_64" CACHE STRING "" FORCE) Set(LLVM_HOST_TRIPLE "x86_64" CACHE STRING "" FORCE) Set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "GNU") Set(CMAKE_CXX_COMPILER "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/圆4/bin/clang++.exe") Set(CMAKE_C_COMPILER_FRONTEND_VARIANT "GNU") Set(CMAKE_C_COMPILER "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/圆4/bin/clang.exe") Where ‘mytoolchain_msvcclang.cmake’ contains the following (for now) - set(CMAKE_SYSTEM_NAME Windows)
#Cmake windows x64 keygen#

I believe the cleanest way to glue the everything together for cmake is to specify a toolchain file that explicitly points to the paths of everything needed. So far, I have the following general directory structure - c:/dev/ This whole endevour has had a few hurdles that I document for the possible benefit of others at the bottom, but I also end up at a problem that I can’t get past and would be greatful for some help. Plus, this is also a learning excercise for me and something which is not entirely well documented (that I can find).

If a build needs a compiler, linker, various headers, and libs and someone knows exactly where to find them, they should be able to simply explicitly point to them. Uninstall and reinstall…”, which just strikes me as a quite error prone solution, relying on a lot of ‘flail and find’ cmake build machinery. There are plenty of people asking for help with issues for which the answer is frequently, “you haven’t installed X properly. “Why do it this way?”, you might well ask: Well, it strikes me as a much more clean, portable, and reproducible way of going about things, to explicitly point to a complier, to system include and lib directories, and even to explicitly point to versions of cmake to use, from just one or two simple config/setup steps. avoiding the cmake machinery that flails around and attempts to automatically find latest versions among multiple installations of toolchains, winsdk and standard library header and lib locations), with as simple, self-contained, and portable/loose directory structure of tools limiting as much as possible the need for anything to be ‘installed’ and explicitly pointing to everything (one way or another) that ends up being needed. However, where I may differ from others who I’ve seen asking for help with similar issues is that I’m attempting to build clang from source as explicitly as possible (i.e. I would like to be able to build clang tools/executables from recent source (I’m using llvm-project-llvmorg-14.0.6), initially using visual studio clang tools (v 13.0.1), but thereafter and for newer versions of clang, using these newly built clang tools themself.
