When I edit the CMakeLists.txt file, the first time it works and uses the cache, but the second time I always get
1> The existing cache contains references to non-existing MSVC compiler. Deleting cache and regenerating.
This only happens If I use the clang compiler. If I use the default msvc compiler the cache is always used
// main.cpp
int main()
{
    return 0;
}
#CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
add_executable(app main.cpp)
//CMakeSettings.json
{
  // See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file.
  "configurations": [
    {
      "name": "x86-Debug",
      "generator": "Ninja",
      "configurationType": "Debug",
      "inheritEnvironments": [ "msvc_x86" ],
      "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
      "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
      "cmakeCommandArgs": "",
      "buildCommandArgs": "-v",
      "ctestCommandArgs": "",
      "variables": [
        {
          "name": "CMAKE_CXX_COMPILER",
          "value": "clang-cl"
        },
        {
          "name": "CMAKE_C_COMPILER",
          "value": "clang-cl"
        },
        {
          "name": "CMAKE_SYSTEM_NAME",
          "value": "Windows"
        }
      ]
    }
  ]
}
 
     
    