Review Request 118106: Simplify dep rule of writeodf.h to rng2cpp, work properly Windows

Friedrich W. H. Kossebau kossebau at kde.org
Thu May 15 12:38:02 BST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118106/
-----------------------------------------------------------

(Updated May 15, 2014, 11:38 a.m.)


Status
------

This change has been marked as submitted.


Review request for Calligra, Yue Liu, Boudewijn Rempt, and Jos van den Oever.


Repository: calligra


Description
-------

"find_program(RNG2CCP_EXECUTABLE rng2cpp [...])", as used to find the path to the rng2cpp executable on Windows, has the disadvantage that it will only work once rng2cpp has been build the first time.

Instead I propose to use the built-in resolution of the created executable and dependency creation with add_custom_command, see http://www.cmake.org/cmake/help/v2.8.0/cmake.html#command:add_custom_command:
"
[...]
If COMMAND specifies an executable target (created by ADD_EXECUTABLE) it will automatically be replaced by the location of the executable created at build time. Additionally a target-level dependency will be added so that the executable target will be built before any target using this custom command. However this does NOT add a file-level dependency that would cause the custom command to re-run whenever the executable is recompiled.
[...]
"
Keeping rng2cpp and ${RNGFILE} as DEPENDS ensure that there is file-level dependency also to the executable.

Works for me on Linux. Does it also work on Windows and OSX?


Diffs
-----

  libs/odf/writeodf/CMakeLists.txt 9a99d48 

Diff: https://git.reviewboard.kde.org/r/118106/diff/


Testing
-------


Thanks,

Friedrich W. H. Kossebau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20140515/819b70f2/attachment.htm>


More information about the calligra-devel mailing list