Notes |
|
(0035763)
|
Peter Kuemmel
|
2014-04-23 12:47
|
|
Introduced by "Qt4: Fix moc command dependencies for incremental build."
734df96f5ad3d47b3c7825715f0b524292aa6ede |
|
|
(0035764)
|
Brad King
|
2014-04-23 12:53
|
|
Re 0014894:0035763: I suspect the files were always re-touched but before that commit there was no dependency on them. |
|
|
(0035767)
|
Stephen Kelly
|
2014-04-24 03:58
|
|
|
|
(0035768)
|
Peter Kuemmel
|
2014-04-24 05:23
|
|
Any Qt program is good for reproducing. But I have not much time ATM. |
|
|
(0035769)
|
Peter Kuemmel
|
2014-04-24 05:23
|
|
|
|
(0035770)
|
Brad King
|
2014-04-24 09:16
|
|
Re 0014894:0035769: The write/read/compare sequence may not be clean due to windows newline conversions. It will be cleaner to use configure_file which automatically does replace-if-different. |
|
|
(0035771)
|
Stephen Kelly
|
2014-04-24 09:40
|
|
I could not reproduce this with Linux or Windows. |
|
|
(0035777)
|
Peter Kuemmel
|
2014-04-25 03:58
|
|
write/read/compare: using configure_file() would only complicate the code, in READ/WRITE iostreams are used in text mode, and the \n mapping to and from windows line ending is done automatically. Only when file(READ) is called with HEX the file is opened in binary mode. |
|
|
(0035778)
|
Peter Kuemmel
|
2014-04-25 04:06
|
|
Is broken also on Linux.
To reproduce build cmake with -DBUILD_QtDialog=1, then call
cmake . && stat ./Source/QtDialog/moc_CMakeSetupDialog.cxx_parameters
and you see how the timestamps change. |
|
|
(0035779)
|
Stephen Kelly
|
2014-04-25 04:44
|
|
stephen@hal:~/dev/src/cmake/ninja{master}$ ninja
ninja: no work to do.
stephen@hal:~/dev/src/cmake/ninja{master}$ cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stephen/dev/src/cmake/ninja
stephen@hal:~/dev/src/cmake/ninja{master}$ ninja -d explain
ninja: no work to do.
stephen@hal:~/dev/src/cmake/ninja{master}$ cmake . && stat ./Source/QtDialog/moc_CMakeSetupDialog.cxx_parameters
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stephen/dev/src/cmake/ninja
File: ‘./Source/QtDialog/moc_CMakeSetupDialog.cxx_parameters’
Size: 777 Blocks: 8 IO Block: 4096 regular file
Device: 806h/2054d Inode: 241685 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ stephen) Gid: ( 1000/ stephen)
Access: 2014-04-24 09:32:19.507890645 +0200
Modify: 2014-04-24 09:32:08.435891108 +0200
Change: 2014-04-24 09:32:08.435891108 +0200
Birth: -
stephen@hal:~/dev/src/cmake/ninja{master}$ cmake . && stat ./Source/QtDialog/moc_CMakeSetupDialog.cxx_parameters
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stephen/dev/src/cmake/ninja
File: ‘./Source/QtDialog/moc_CMakeSetupDialog.cxx_parameters’
Size: 777 Blocks: 8 IO Block: 4096 regular file
Device: 806h/2054d Inode: 241685 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ stephen) Gid: ( 1000/ stephen)
Access: 2014-04-24 09:32:19.507890645 +0200
Modify: 2014-04-24 09:32:08.435891108 +0200
Change: 2014-04-24 09:32:08.435891108 +0200
Birth: - |
|
|
(0035780)
|
Peter Kuemmel
|
2014-04-25 06:38
|
|
You use the cmake in PATH. Are you sure this calls the cmake build from master?
For instance, when I call cmake 2.8.9 the timestamps also does not change. |
|
|
(0035781)
|
Stephen Kelly
|
2014-04-25 07:37
|
|
Yes, it is a recent build of cmake. Please create a smaller testcase than 'build cmake'. |
|
|
(0035782)
|
Stephen Kelly
|
2014-04-25 07:41
|
|
Ah, it must not have been. I can reproduce it now. |
|
|
(0035783)
|
Stephen Kelly
|
2014-04-25 07:51
|
|
Or rather, it was a recent cmake build, but the QtDialog was being built with Qt 5, which doesn't have that change in the macro yet, not Qt 4. |
|
|
(0035784)
|
Stephen Kelly
|
2014-04-25 07:54
|
|
... which of course underscores why you should have created a standalone smaller testcase. |
|
|
(0035785)
|
Peter Kuemmel
|
2014-04-25 08:50
|
|
I preferred fixing the bug. |
|
|
(0035786)
|
Brad King
|
2014-04-25 08:59
|
|
Re 0014894:0035777: Using configure_file is *the* convention in CMake to do copy-if-different for file generation. The code is simply:
- file(WRITE ${_moc_parameters_file} "${_moc_parameters}\n")
+ set(CMAKE_CONFIGURABLE_FILE_CONTENT "${_moc_parameters}")
+ configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
+ "${_moc_parameters_file}" @ONLY)
However, now that the parameters file timestamp really doesn't change, the Qt4Targets test fails its IncrementalMoc case because the ADD_DEF=1 rebuild adds a COMPILE_DEFINITIONS entry to the target but the code path taken in QT4_CREATE_MOC_COMMAND does not consider the target flags. Steve?
|
|
|
(0035787)
|
Stephen Kelly
|
2014-04-25 09:51
|
|
|
|
(0035790)
|
Brad King
|
2014-04-25 10:06
|
|
Re 0014894:0035787: The file(GENERATE) command could learn a COPY_IF_DIFFERENT option for this. However, when I run Qt4Targets locally the IncrementalMocBuild tree clearly takes the non-target code path and is not influenced by the ADD_DEF change. |
|
|
(0035791)
|
Peter Kuemmel
|
2014-04-25 12:30
|
|
|
|
(0035801)
|
Stephen Kelly
|
2014-04-29 10:39
|
|
Peter, your patch introduces a failure in the Qt4Targets unit test. Could you have a look?
Thanks, |
|
|
(0035805)
|
Peter Kuemmel
|
2014-04-29 13:34
|
|
I had a look at it but not really an idea how to fix it;
The test calls:
try_compile(RESULT
"${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild"
"${CMAKE_CURRENT_SOURCE_DIR}/IncrementalMoc"
IncrementalMoc
CMAKE_FLAGS -DADD_DEF=0 "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}")
and the macro calls get_directory_property(_defines COMPILE_DEFINITIONS) but -DADD_DEF=0 does not pop up as parameter. Where is it stored? |
|
|
(0035813)
|
Peter Kuemmel
|
2014-05-02 03:16
|
|
|
|
(0037128)
|
Robert Maynard
|
2014-11-03 08:37
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|