

Delete your project's binary output directory (including CMakeCache.txt) and do cmake.exe.Overrule the generator choice by given the right one with cmake.exe -G "MinGW Makefiles".What is a very useful feature, if you have multiple compilers installed.īut if you then declare the CC environment variable - as the error message suggests - it's too late since your generator's choice was remembered in the first try. 19 minutes to read 12 contributors Feedback In this article Supported CMake and CMakePresets.json versions Enable CMakePresets. This setup will make it easy to configure the Path and find things later on.
Cmake generator windows install#
Now here comes the problem: it does remember your implicit generator/compiler choice in it's variable cache (see CMAKE_GENERATOR in CMakeCache.txt). Install CMake Install Python Install Git Download Pico SDK and Examples Update Environment Variables Install VS Code Build Blink Example Directory Setup With the exception of CMake and Python, we will want all of our tools and SDK files to exist in one folder on Windows.

If set, CMake will unconditionally use it as the -G CMake generator command line argument. In short, you ran into a chicken-and-egg kind of a problem.ĬMake's compiler detection is mighty, but since - during the first try - Set to a string to override CMake Tools preferred generator logic.

Because CMake's error message is misleading here, I think it warrants a little more detailed answer.
