cmake: fix sporadic WSDG build failure on Windows
authorPeter Wu <peter@lekensteyn.nl>
Fri, 31 Mar 2017 16:14:38 +0000 (18:14 +0200)
committerAnders Broman <a.broman58@gmail.com>
Wed, 12 Apr 2017 04:18:18 +0000 (04:18 +0000)
commitaa9a0b3bf831395dc1cfbaea7f467faed952dbf9
tree1e3614eabe31e7cdd48168e17edb6218a8b35e18
parenta71811af0de3ca9e7b5569f6e0f43dc7d4052d02
cmake: fix sporadic WSDG build failure on Windows

The Windows builds (using msbuild) fail sporadically when building
documentation (target developer_guides). The problem is that the targets
"developer_guide_pdf_a4" and "developer_guide_html" both depend on
developer-guide.xml and msbuild does not notice that the file has
already been generated by the generate_developer-guide.xml target.

For a discussion of the problem, see
https://gitlab.kitware.com/cmake/cmake/issues/16767

To fix this, remove the "developer-guide.xml" dependency from
"developer_guide_xyz" (to prevent these targets from triggering building
"developer-guide.xml"). Instead, depend on a generated
"developer-guide.xml-stamp" file which is created by the
"generate_developer-guide.xml" target (but do *not* add it as output of
this target, otherwise we will have the original problem again).

This workaround is restricted to the MSVC generators because otherwise
it would trigger a CMP0058 policy warning when used with Ninja.

Change-Id: Idb3975cde35be2601b038a500d4886bbd3a684d7
Reviewed-on: https://code.wireshark.org/review/20812
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
cmake/modules/FindASCIIDOC.cmake
cmake/modules/FindXSLTPROC.cmake