Skip to content

Commit

Permalink
CMake: avoid if() around the whole contents of documentation CMakeLis…
Browse files Browse the repository at this point in the history
…ts.txt
  • Loading branch information
DerDakon authored and Rolf Eike Beer committed Oct 20, 2017
1 parent b54b843 commit 62e8740
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Expand Up @@ -143,8 +143,11 @@ add_subdirectory(libmd5)
add_subdirectory(qtools)
add_subdirectory(vhdlparser)
add_subdirectory(src)
add_subdirectory(examples)
add_subdirectory(doc)

if (build_doc)
add_subdirectory(examples)
add_subdirectory(doc)
endif ()

add_subdirectory(addon)

Expand Down
4 changes: 0 additions & 4 deletions doc/CMakeLists.txt
Expand Up @@ -11,8 +11,6 @@
# Documents produced by Doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.

if (build_doc)

include (${TOP}/cmake/version.cmake)
string(TIMESTAMP DATE "%d-%m-%Y")

Expand Down Expand Up @@ -181,5 +179,3 @@ install(DIRECTORY
"${PROJECT_BINARY_DIR}/html"
DESTINATION "${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR}"
)

endif()
4 changes: 0 additions & 4 deletions examples/CMakeLists.txt
@@ -1,5 +1,3 @@
if (build_doc)

file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/examples
${PROJECT_BINARY_DIR}/html/examples)
file(GLOB EXAMPLE_FILES RELATIVE ${CMAKE_SOURCE_DIR}/examples "*")
Expand Down Expand Up @@ -246,5 +244,3 @@ if (DOT)
OUTPUT ${PROJECT_BINARY_DIR}/html/examples/diagrams/html/index.html ${PROJECT_BINARY_DIR}/html/examples/diagrams/latex/refman_doc.tex
)
endif(DOT)

endif()

0 comments on commit 62e8740

Please sign in to comment.