From 6261a5c27bac07275178889052ae983e828a0811 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 4 May 2017 15:28:20 +0100 Subject: [PATCH 1/2] Fix bug in `mk_api_doc.py` where the Z3 python package path would be checked when building the Z3 python package documentation was disabled. --- doc/mk_api_doc.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/mk_api_doc.py b/doc/mk_api_doc.py index 014a152b4..234dd670c 100644 --- a/doc/mk_api_doc.py +++ b/doc/mk_api_doc.py @@ -103,15 +103,17 @@ def parse_options(): TEMP_DIR = pargs.temp_dir OUTPUT_DIRECTORY = pargs.output_dir Z3PY_PACKAGE_PATH = pargs.z3py_package_path - if not os.path.exists(Z3PY_PACKAGE_PATH): - raise Exception('"{}" does not exist'.format(Z3PY_PACKAGE_PATH)) - if not os.path.basename(Z3PY_PACKAGE_PATH) == 'z3': - raise Exception('"{}" does not end with "z3"'.format(Z3PY_PACKAGE_PATH)) Z3PY_ENABLED = not pargs.no_z3py DOTNET_ENABLED = not pargs.no_dotnet JAVA_ENABLED = not pargs.no_java DOTNET_API_SEARCH_PATHS = pargs.dotnet_search_paths JAVA_API_SEARCH_PATHS = pargs.java_search_paths + + if Z3PY_ENABLED: + if not os.path.exists(Z3PY_PACKAGE_PATH): + raise Exception('"{}" does not exist'.format(Z3PY_PACKAGE_PATH)) + if not os.path.basename(Z3PY_PACKAGE_PATH) == 'z3': + raise Exception('"{}" does not end with "z3"'.format(Z3PY_PACKAGE_PATH)) return def mk_dir(d): From 1db07f1189d6560316537ec4822d41e84f0a7105 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 4 May 2017 15:29:47 +0100 Subject: [PATCH 2/2] [CMake] Remove `BYPRODUCTS` declaration for `api_docs` target. This breaks the `clean` rule when using Ninja as the CMake generator. Unfortunately this means `clean` doesn't try to remove the generated documentation anymore when using Ninja. --- contrib/cmake/doc/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/cmake/doc/CMakeLists.txt b/contrib/cmake/doc/CMakeLists.txt index 86e208ab1..2f8ee0dc5 100644 --- a/contrib/cmake/doc/CMakeLists.txt +++ b/contrib/cmake/doc/CMakeLists.txt @@ -67,7 +67,6 @@ add_custom_target(api_docs ${ALWAYS_BUILD_DOCS_ARG} ${JAVA_API_OPTIONS} DEPENDS ${DOC_EXTRA_DEPENDS} - BYPRODUCTS "${DOC_DEST_DIR}" COMMENT "Generating documentation" ${ADD_CUSTOM_TARGET_USES_TERMINAL_ARG} )