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. CMake configuration error "Current configuration mixes up CLang and MSVC"
Forum Updated to NodeBB v4.3 + New Features

CMake configuration error "Current configuration mixes up CLang and MSVC"

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.1k 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.
  • Dharani PrasadD Offline
    Dharani PrasadD Offline
    Dharani Prasad
    wrote on last edited by
    #1

    The current configuration mixes Clang and MSVC or some other CL compatible compiler tool. This is not supported. Use either clang or MSVC as both C and C compilers. C:/Program Files/CMake/share/cmake-3.19/Modules/Platform/Windows-Clang-C.cmake:1 (include) C:/Program Files/CMake/share/cmake-3.19/Modules/CMakeCInformation.cmake:48 (include) CMakeLists.txt:3 (project)

    Can someone help me identify the solution to resolve this problem

    Thanks in advance!

    jsulmJ 1 Reply Last reply
    0
    • Dharani PrasadD Dharani Prasad

      The current configuration mixes Clang and MSVC or some other CL compatible compiler tool. This is not supported. Use either clang or MSVC as both C and C compilers. C:/Program Files/CMake/share/cmake-3.19/Modules/Platform/Windows-Clang-C.cmake:1 (include) C:/Program Files/CMake/share/cmake-3.19/Modules/CMakeCInformation.cmake:48 (include) CMakeLists.txt:3 (project)

      Can someone help me identify the solution to resolve this problem

      Thanks in advance!

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Dharani-Prasad The error message says what the problem is.
      But to find out why this happens you will have to provide more information. For example: how you call cmake (parameters), your CMakeLists.txt files.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      Dharani PrasadD 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Dharani-Prasad The error message says what the problem is.
        But to find out why this happens you will have to provide more information. For example: how you call cmake (parameters), your CMakeLists.txt files.

        Dharani PrasadD Offline
        Dharani PrasadD Offline
        Dharani Prasad
        wrote on last edited by
        #3

        @jsulm Here is my CMakeLists.txt

        cmake_minimum_required(VERSION 3.5)
        
        project("projectName")
        
        #Modules
        
        add_subdirectory(src/Module1/Module1.1)
        add_subdirectory(src/Module1/Module1.2)
        add_subdirectory(src/Module1/Module1.3)
        
        add_subdirectory(src/Module2/Module2.1)
        
        add_subdirectory(src/Module3/Module3.1)
        
        add_subdirectory(src/Module4/Module4.1)
        
        add_subdirectory(src/Module5/Module5.1)
        
        add_subdirectory(src/Module6/Module6.1)
        
        add_subdirectory(src/Module7/Module7.1)
        
        #excutable
        add_subdirectory(src/excutableModule)
        
        jsulmJ 1 Reply Last reply
        0
        • Dharani PrasadD Dharani Prasad

          @jsulm Here is my CMakeLists.txt

          cmake_minimum_required(VERSION 3.5)
          
          project("projectName")
          
          #Modules
          
          add_subdirectory(src/Module1/Module1.1)
          add_subdirectory(src/Module1/Module1.2)
          add_subdirectory(src/Module1/Module1.3)
          
          add_subdirectory(src/Module2/Module2.1)
          
          add_subdirectory(src/Module3/Module3.1)
          
          add_subdirectory(src/Module4/Module4.1)
          
          add_subdirectory(src/Module5/Module5.1)
          
          add_subdirectory(src/Module6/Module6.1)
          
          add_subdirectory(src/Module7/Module7.1)
          
          #excutable
          add_subdirectory(src/excutableModule)
          
          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Dharani-Prasad Well, in that one is nothing apparent. But you have many add_subdirectory, so you should check these also.
          And you did not say how you're calling CMake...

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          VRoninV 1 Reply Last reply
          1
          • jsulmJ jsulm

            @Dharani-Prasad Well, in that one is nothing apparent. But you have many add_subdirectory, so you should check these also.
            And you did not say how you're calling CMake...

            VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by
            #5

            @jsulm said in CMake configuration error "Current configuration mixes up CLang and MSVC":

            And you did not say how you're calling CMake...

            This is crucial, you probably just need to specify the correct generator.
            In any case it looks like your PATH is well polluted which is never great

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            1 Reply Last reply
            2

            • Login

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