Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to reset CMake in QT Creator?
Forum Updated to NodeBB v4.3 + New Features

How to reset CMake in QT Creator?

Scheduled Pinned Locked Moved Solved General and Desktop
cmake
2 Posts 1 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dmitriano
    wrote on 8 Aug 2021, 12:36 last edited by
    #1

    I updated Visual Studio on my Windows 10 machine and started to get the following error when running CMake from QT creator:

    CMakeLists.txt:5: error: The CMAKE_C_COMPILER: cl is not a full path and was not found in the PATH. To use the JOM generator with Visual C++, cmake must be run from a shell that can use the compiler cl from the command line. This environment is unable to invoke the cl compiler. To fix this problem, run cmake from the Visual Studio Command Prompt (vcvarsall.bat). Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

    This error can be fixed by removing intermediate CMake files from previous build, but I can't figure out where are they, because my build directory does not exist at all.

    I tried to re-add CMake to Kits, and to "Re-configure CMake with initial parameters" in my project settings, but with no success.

    D 1 Reply Last reply 29 Sept 2021, 11:31
    0
    • D Dmitriano
      8 Aug 2021, 12:36

      I updated Visual Studio on my Windows 10 machine and started to get the following error when running CMake from QT creator:

      CMakeLists.txt:5: error: The CMAKE_C_COMPILER: cl is not a full path and was not found in the PATH. To use the JOM generator with Visual C++, cmake must be run from a shell that can use the compiler cl from the command line. This environment is unable to invoke the cl compiler. To fix this problem, run cmake from the Visual Studio Command Prompt (vcvarsall.bat). Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

      This error can be fixed by removing intermediate CMake files from previous build, but I can't figure out where are they, because my build directory does not exist at all.

      I tried to re-add CMake to Kits, and to "Re-configure CMake with initial parameters" in my project settings, but with no success.

      D Offline
      D Offline
      Dmitriano
      wrote on 29 Sept 2021, 11:31 last edited by
      #2

      I fixed this buy changing C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat with C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsx86_arm64.bat., see https://developernote.com/2021/09/how-i-fixed-cmake-configuration-has-no-path-to-c-compiler-in-qt-creator/

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved