diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2022-03-18 11:35:24 +0000 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2022-03-22 09:21:48 +0000 |
commit | 5a633251bb6168b8b7e5d0cd7d554858e96a3b0e (patch) | |
tree | 644dccc395a89df0f44a1ffd931723373710c01c | |
parent | 663e034926bbcefa6c179b16d9156296f782630b (diff) | |
download | klee-5a633251bb6168b8b7e5d0cd7d554858e96a3b0e.tar.gz |
Install doxygen and graphviz (dot) to generate Doxygen documentation when ENABLE_DOXYGEN=ON
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | docs/CMakeLists.txt | 15 | ||||
-rw-r--r-- | scripts/build/p-klee-linux-ubuntu.inc | 4 | ||||
-rw-r--r-- | scripts/build/p-klee-osx.inc | 3 |
4 files changed, 18 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile index 7b94d4ee..327fdefb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ LABEL maintainer="KLEE Developers" # TODO remove adding sudo package # Create ``klee`` user for container with password ``klee``. # and give it password-less sudo access (temporarily so we can use the CI scripts) -RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install sudo emacs-nox vim-nox file python3-dateutil doxygen && \ +RUN apt update && DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install sudo emacs-nox vim-nox file python3-dateutil && \ rm -rf /var/lib/apt/lists/* && \ useradd -m klee && \ echo klee:klee | chpasswd && \ diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 8cbd93c9..b8a4a38b 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -12,9 +12,9 @@ add_custom_target(docs) option(ENABLE_DOXYGEN "Enable building doxygen documentation" OFF) if (ENABLE_DOXYGEN) - find_package(Doxygen) - if (DOXYGEN_FOUND) - message(STATUS "Doxygen found") + find_package(Doxygen OPTIONAL_COMPONENTS dot) + if (DOXYGEN_FOUND AND TARGET Doxygen::dot) + message(STATUS "Doxygen and dot found") set(abs_top_srcdir "${CMAKE_SOURCE_DIR}") set(abs_top_builddir "${CMAKE_BINARY_DIR}") @@ -23,7 +23,7 @@ if (ENABLE_DOXYGEN) # Add rule to build doxygen documentation add_custom_target(doc-doxygen - COMMAND "${DOXYGEN_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg" + COMMAND Doxygen::doxygen "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg" COMMENT "Generating Doxygen documentation" USES_TERMINAL ) @@ -42,7 +42,12 @@ if (ENABLE_DOXYGEN) endif () else() - message(WARNING "Doxygen not found. Can't build Doxygen documentation") + if (NOT DOXYGEN_FOUND) + message(WARNING "Doxygen not found. Can't build Doxygen documentation") + endif () + if (NOT TARGET Doxygen::dot) + message(WARNING "dot (graphviz) not found. Can't build Doxygen documentation") + endif () set(ENABLE_DOXYGEN OFF CACHE BOOL diff --git a/scripts/build/p-klee-linux-ubuntu.inc b/scripts/build/p-klee-linux-ubuntu.inc index d2847343..4b8a89bf 100644 --- a/scripts/build/p-klee-linux-ubuntu.inc +++ b/scripts/build/p-klee-linux-ubuntu.inc @@ -38,6 +38,10 @@ install_build_dependencies_klee() { dependencies+=(lcov curl git) fi + if [[ $(to_bool "${ENABLE_DOXYGEN}") -eq 1 ]]; then + dependencies+=(doxygen graphviz) + fi + apt -y --no-install-recommends install "${dependencies[@]}" pip3 install lit diff --git a/scripts/build/p-klee-osx.inc b/scripts/build/p-klee-osx.inc index fae6bbd3..38eaa02c 100644 --- a/scripts/build/p-klee-osx.inc +++ b/scripts/build/p-klee-osx.inc @@ -2,5 +2,8 @@ install_build_dependencies_klee() { brew upgrade python # upgrade to Python 3 brew link --overwrite python + if [[ $(to_bool "${ENABLE_DOXYGEN}") -eq 1 ]]; then + brew install doxygen graphviz + fi pip3 install lit tabulate } \ No newline at end of file |