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

Extending `_qt_internal_set_source_file_generated`

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P4: Low
    • None
    • None
    • Build System: CMake
    • None

    Description

      The helper function is created as part of QTBUG-125077 and for now only covers the `SKIP_LINTING` feature, but maybe there are additional functionalities that should be integrated with it.

      Interaction with `configure_file`

      So far we have seen one peculiarity in how `configure_file` interacts with `GENERATED True`. Normally, after setting `GENERATED True`, the files seem to be removed during the clean stage (although this also seems to depend on generator), example:

      cmake_minimum_required(VERSION 3.16)
      
      project(configure_file_wierdness
              LANGUAGES CXX
      )
      
      add_executable(test_configure)
      add_executable(test_generate)
      
      target_sources(test_configure PRIVATE test_configure.cpp)
      target_sources(test_generate PRIVATE test_generate.cpp)
      
      set_source_files_properties(test_configure.cpp test_generate.cpp
          PROPERTIES GENERATED TRUE
      )
      
      configure_file(test.cpp.in test_configure.cpp @ONLY)
      file(GENERATE OUTPUT test_generate.cpp INPUT test.cpp.in)
      
      enable_testing()
      add_test(
          NAME configure
          COMMAND $<TARGET_FILE:test_configure>
      )
      add_test(
          NAME generate
          COMMAND $<TARGET_FILE:test_configure>
      )
      
      

      and try to run:

      $ ctest --build-and-test ./ ctest_build/ --build-generator Ninja
      

      So far this is all normal and ok, but something is going on when dealing with `qt_internal_generate_cpp_global_exports`, where:

      • When `GENERATED True`: the clean does not affect the files generated there, so there is some additional interaction going on
      • When `GENERATED False`: the installation fails to pick up the file

      Probably there is some deeper connection with `syncqt` that is relevant to investigate.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            lecris Cristian Le
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes