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

Teach CMake AUTOMOC to use a target's CXX language version for the generation of moc predefines file

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P3: Somewhat important
    • None
    • 6.5.0 Beta2
    • Build System: CMake

    Description

      CMake's AUTOMOC generates a moc_predefs.h file that it then passes to moc invocations.

      That file is generated by calling the CMAKE_CXX_COMPILER_PREDEFINES_COMMAND
      which looks something like:

      /usr/bin/c++ -dM -E -c <cmake_install_dir>/Modules/CMakeCXXCompilerABI.cpp
      

      This compiler invocation is missing the c++ standard version flag, which can influence the list of predefined defines.

      CMake should be fixed to pass the target's specified c++ std version to the predefines command.

      Original implementation of predefine generation was done at https://gitlab.kitware.com/cmake/cmake/-/merge_requests/1328/diffs

      Attachments

        Issue Links

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

          Activity

            People

              orkun.tokdemir Orkun Tokdemir
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week
                  1w

                  Gerrit Reviews

                    There are no open Gerrit changes