diff options
author | Christian Tismer <tismer@stackless.com> | 2015-09-19 01:51:41 +0100 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2015-09-19 01:54:35 +0100 |
commit | 886748d08607ac856b63ac7a1b352bc02e4d1973 (patch) | |
tree | e3918a28317cc72d6895f24757ae19fc13acb7c0 /doc/CMakeLists.txt | |
parent | ed133ad6100a94594e9c2b6f1a62eb3874be1f72 (diff) |
work around a 'jom' bug on windows.
Om windows, when no sphinx tool is installed, a build with 'jom' would crash,
because the "doc" target is not created. This is a 'jom' bug, because things work with nmake.
By always generating a "doc" target, this is circumvented. Instead of crashing, I write
a message. This is quite helpful for test builds.
Also, a wrong "win32" variable was used, which must be upper case.
Diffstat (limited to 'doc/CMakeLists.txt')
-rw-r--r-- | doc/CMakeLists.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 57c8fa757..7bd0161ad 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -7,9 +7,18 @@ if (SPHINX) add_custom_target(doc ${SPHINX} -b html -c . ${CMAKE_CURRENT_SOURCE_DIR} html ) else() message("-- sphinx-build - not found! doc target disabled") + if (WIN32) + # if jom is used and we have no sphinx, then jom will crash. + # so for windows, we always create a doc target (until jom gets fixed...) + add_custom_target(doc echo. + COMMAND echo +++ This is a fake build, to make 'jom' happy. + COMMAND echo +++ The documentation was _not_ built! + COMMAND echo. + ) + endif() endif() -if (NOT win32) +if (NOT WIN32) file(GLOB manpages "${CMAKE_CURRENT_SOURCE_DIR}/*.1") install(FILES ${manpages} DESTINATION share/man/man1) endif() |