about summary refs log tree commit diff homepage
path: root/docs
diff options
context:
space:
mode:
authorMartin Nowack <m.nowack@imperial.ac.uk>2020-04-06 14:38:50 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-11-04 15:14:47 +0000
commitd5cbc2002bbf75f08036f7adf861b027768a0622 (patch)
treefdd740a18d97e11f7514431cf6ca29875207de73 /docs
parenta19b626b76d05192954501e631dc29d5f4d13702 (diff)
downloadklee-d5cbc2002bbf75f08036f7adf861b027768a0622.tar.gz
[cmake] Use clean command to remove generated doxygen files
Diffstat (limited to 'docs')
-rw-r--r--docs/CMakeLists.txt17
1 files changed, 8 insertions, 9 deletions
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 6f4168c3..5cab7b4a 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -33,15 +33,14 @@ if (ENABLE_DOXYGEN)
     # doxygen.cfg
     set(DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doxygen")
 
-    # Add rule to clean doxygen documentation
-    add_custom_target(clean_doxygen
-      COMMAND
-        "${CMAKE_COMMAND}"
-        "-E"
-        "remove_directory"
-        "${DOXYGEN_OUTPUT_DIR}"
-    )
-    add_dependencies(clean_all clean_doxygen)
+    if ("${CMAKE_VERSION}" VERSION_LESS "3.15")
+      set_directory_properties(PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
+              "${DOXYGEN_OUTPUT_DIR}")
+    else ()
+      set_directory_properties(PROPERTY ADDITIONAL_CLEAN_FILES
+              "${DOXYGEN_OUTPUT_DIR}")
+    endif ()
+
   else()
     message(WARNING "Doxygen not found. Can't build Doxygen documentation")
     set(ENABLE_DOXYGEN OFF