Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator, CMake project and MSVC compiler
Forum Updated to NodeBB v4.3 + New Features

Qt Creator, CMake project and MSVC compiler

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 3 Posters 4.4k Views 2 Watching
  • 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.
  • SebastianMS Offline
    SebastianMS Offline
    SebastianM
    wrote on last edited by SebastianM
    #1

    Hi,
    I'm working on Windows.
    Project configuration is created with help of CMake (with one executable and multiple custom targets to run bat files).
    I've created MSVC 2010 build kit. When CMake generator is set to Visual Studio 2010 - build kit reports warning - like : alt text and CMake test build attempt fail.
    Then I change CMake generator to "NMake Makefiles". Then CMake regenerates successfully. However no source/header files are visible in project. Moreover - Warning is the same - "CMake generator does not generate a CodeBlocks file".

    How to setup this project so I could see and be able to work with files?

    PS: Windows 10, MSVC 2010, CMake 3.7, Qt Creator 4.2.1

    A 1 Reply Last reply
    0
    • SebastianMS SebastianM

      Hi,
      I'm working on Windows.
      Project configuration is created with help of CMake (with one executable and multiple custom targets to run bat files).
      I've created MSVC 2010 build kit. When CMake generator is set to Visual Studio 2010 - build kit reports warning - like : alt text and CMake test build attempt fail.
      Then I change CMake generator to "NMake Makefiles". Then CMake regenerates successfully. However no source/header files are visible in project. Moreover - Warning is the same - "CMake generator does not generate a CodeBlocks file".

      How to setup this project so I could see and be able to work with files?

      PS: Windows 10, MSVC 2010, CMake 3.7, Qt Creator 4.2.1

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @SebastianM This sounds like a cmake problem... Can I see your CMakeLists.txt file?

      Although I admit I don't think I've used Qt Creator with MSVC generator before. Usually it's mingw/qt creator when I play with it in windows. So it may not be a cmake thing.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      0
      • SebastianMS Offline
        SebastianMS Offline
        SebastianM
        wrote on last edited by SebastianM
        #3

        I didn't set Extra generator field. Now files are visible.

        1 Reply Last reply
        1
        • hungerH Offline
          hungerH Offline
          hunger
          wrote on last edited by
          #4

          Qt Creator 4.2 needs a cmake generator with "CodeBlocks" in its name: Most of the data is extracted from a file ending with the ".cbp" extension (the CodeBlocks project file). So AFAIR the Visual Studio generators are not supported.

          The upcoming Qt Creator 4.3 no longer needs the "CodeBlocks" Extragenerator -- provided you use cmake version 3.7. That version supports "server-mode" -- provided you did not exclude it when building cmake). You are free to choose whatever generator you like with such a setup. You also get a better project tree that way. The "CodeBlocks" requirement unfortunately stays for older cmake versions though.

          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