Raef Coles | 1971538 | 2020-07-10 09:50:17 +0100 | [diff] [blame] | 1 | From 53f18f73c9cee3253c19f67ad0753315eea6a688 Mon Sep 17 00:00:00 2001 |
| 2 | From: Raef Coles <raef.coles@arm.com> |
| 3 | Date: Mon, 15 Jun 2020 10:16:44 +0100 |
| 4 | Subject: [PATCH 2/6] Make api documentation target optional |
| 5 | |
| 6 | Adds a cmake variable BUILD_API_DOCS which controls whether the cmake |
| 7 | target for the docs will be generated. This can be used to avoid cmake |
| 8 | target clashes or to otherwise customise the cmake build. |
| 9 | |
| 10 | Signed-off-by: Raef Coles <raef.coles@arm.com> |
| 11 | --- |
| 12 | CMakeLists.txt | 9 ++++++--- |
| 13 | 1 file changed, 6 insertions(+), 3 deletions(-) |
| 14 | |
| 15 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 16 | index 1f675c1ee..5d970b9fd 100644 |
| 17 | --- a/CMakeLists.txt |
| 18 | +++ b/CMakeLists.txt |
| 19 | @@ -12,6 +12,7 @@ option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library. |
| 20 | option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF) |
| 21 | |
| 22 | option(ENABLE_PROGRAMS "Build mbed TLS programs." ON) |
| 23 | +option(ENABLE_DOCS "Build api documentation." ON) |
| 24 | |
| 25 | option(UNSAFE_BUILD "Allow unsafe builds. These builds ARE NOT SECURE." OFF) |
| 26 | option(MBEDTLS_FATAL_WARNINGS "Compiler warnings treated as errors" ON) |
| 27 | @@ -229,9 +230,11 @@ if(ENABLE_PROGRAMS) |
| 28 | add_subdirectory(programs) |
| 29 | endif() |
| 30 | |
| 31 | -ADD_CUSTOM_TARGET(apidoc |
| 32 | - COMMAND doxygen mbedtls.doxyfile |
| 33 | - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doxygen) |
| 34 | +if(ENABLE_DOCS) |
| 35 | + ADD_CUSTOM_TARGET(apidoc |
| 36 | + COMMAND doxygen mbedtls.doxyfile |
| 37 | + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doxygen) |
| 38 | +endif() |
| 39 | |
| 40 | if(ENABLE_TESTING) |
| 41 | enable_testing() |
| 42 | -- |
| 43 | 2.20.1 |
| 44 | |