-
Task
-
Resolution: Unresolved
-
P4: Low
-
None
-
None
-
None
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.