Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-82014

5.12.7 breaks cmake´s qt5_wrap_cpp()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12.8
    • 5.12.7
    • Build System
    • None
    • Windows

    Description

      This program fails to compile with Qt 5.12.7:

      cmake_minimum_required(VERSION 3.3.0)
      project(myproject C CXX)
      
      # The following works: 
      # set(CMAKE_AUTOMOC ON)
      
      find_package(Qt5Widgets REQUIRED)
      
      set(SOURCES MainWindow.cpp main.cpp)
      
      # This line is broken with Qt 5.12.7: 
      qt5_wrap_cpp(SOURCES MainWindow.h)
      
      add_executable(myapp ${SOURCES} MainWindow.h)
      target_link_libraries(myapp Qt5::Widgets)
      
      

       With the following message:

      CMake Error at C:/Qt/5.12.7/msvc2017_64/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:131 (file):
        file failed to open for writing (Invalid argument):
      
          Z:/qt5_wrap_test/build/moc_Z:/qt5_wrap_test/build/MainWindow.cpp_parameters
      Call Stack (most recent call first):
        C:/Qt/5.12.7/msvc2017_64/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:181 (qt5_create_moc_command)
        CMakeLists.txt:7 (qt5_wrap_cpp)
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jbornema Joerg Bornemann
            bjornpiltz Björn Piltz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes