Page MenuHomePhabricator

[CMAKE] Fix doxygen generation
ClosedPublic

Authored by Fabien on Oct 23 2020, 09:20.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCae5a6890d31f: [CMAKE] Fix doxygen generation
Summary

When looking at D8061, it appeared that the doxygen documentation
generation was broken. The template file use relative paths which are
invalid once run from the build directory as documented. This diff fixes
the doxygen generation in several ways:

  • It moves the doxygen files to their own directory doc/doxygen
  • It uses CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR to no longer rely on the callsite location
  • It adds a gen-doxygen target to actually build the doc
  • It updates the documentation accordingly
  • It builds the docs on CI to check for regression
Test Plan
ninja doc-doxygen

Look at the output in your build dir under doc/doxygen/html.

./contrib/teamcity/build-configurations.py build-docs

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Oct 23 2020, 09:20

Tail of the build log:

-- Performing Test have_CXX__Wno_shadow - Success
-- Performing Test have_CXX__Wno_sign_compare
-- Performing Test have_CXX__Wno_sign_compare - Success
-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1d") found components: Crypto 
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: filesystem system 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: thread chrono system date_time atomic 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.1", minimum required is "1.5")  
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.1", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.6.1") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1d")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
CMake Error at doc/CMakeLists.txt:3 (add_subdirectory):
  The source directory

    /work/doc/doxygen

  does not contain a CMakeLists.txt file.


-- Configuring native build in /work/abc-ci-builds/build-clang/native
-- Configuring incomplete, errors occurred!
See also "/work/abc-ci-builds/build-clang/CMakeFiles/CMakeOutput.log".
See also "/work/abc-ci-builds/build-clang/CMakeFiles/CMakeError.log".
Build build-clang failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_shadow - Success
-- Performing Test have_CXX__Wno_sign_compare
-- Performing Test have_CXX__Wno_sign_compare - Success
-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1d") found components: Crypto 
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: filesystem system 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: thread chrono system date_time atomic 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.1", minimum required is "1.5")  
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.1", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.6.1") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1d")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
CMake Error at doc/CMakeLists.txt:3 (add_subdirectory):
  The source directory

    /work/doc/doxygen

  does not contain a CMakeLists.txt file.


-- Configuring native build in /work/abc-ci-builds/build-debug/native
-- Configuring incomplete, errors occurred!
See also "/work/abc-ci-builds/build-debug/CMakeFiles/CMakeOutput.log".
See also "/work/abc-ci-builds/build-debug/CMakeFiles/CMakeError.log".
Build build-debug failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_shadow - Success
-- Performing Test have_CXX__Wno_sign_compare
-- Performing Test have_CXX__Wno_sign_compare - Success
-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1d") found components: Crypto 
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: filesystem system 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: thread chrono system date_time atomic 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.1", minimum required is "1.5")  
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.1", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.6.1") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1d")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
CMake Error at doc/CMakeLists.txt:3 (add_subdirectory):
  The source directory

    /work/doc/doxygen

  does not contain a CMakeLists.txt file.


-- Configuring native build in /work/abc-ci-builds/build-clang-tidy/native
-- Configuring incomplete, errors occurred!
See also "/work/abc-ci-builds/build-clang-tidy/CMakeFiles/CMakeOutput.log".
See also "/work/abc-ci-builds/build-clang-tidy/CMakeFiles/CMakeError.log".
Build build-clang-tidy failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_shadow - Success
-- Performing Test have_CXX__Wno_sign_compare
-- Performing Test have_CXX__Wno_sign_compare - Success
-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1d") found components: Crypto 
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: filesystem system 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: thread chrono system date_time atomic 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.1", minimum required is "1.5")  
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.1", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.6.1") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1d")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
CMake Error at doc/CMakeLists.txt:3 (add_subdirectory):
  The source directory

    /work/doc/doxygen

  does not contain a CMakeLists.txt file.


-- Configuring native build in /work/abc-ci-builds/build-diff/native
-- Configuring incomplete, errors occurred!
See also "/work/abc-ci-builds/build-diff/CMakeFiles/CMakeOutput.log".
See also "/work/abc-ci-builds/build-diff/CMakeFiles/CMakeError.log".
Build build-diff failed with exit code 1

Tail of the build log:

-- Performing Test have_CXX__Wno_inconsistent_missing_override - Success
-- Performing Test have_CXX__Wno_maybe_uninitialized
-- Performing Test have_CXX__Wno_maybe_uninitialized - Success
-- Performing Test have_CXX__Wno_shadow
-- Performing Test have_CXX__Wno_shadow - Success
-- Performing Test have_CXX__Wno_sign_compare
-- Performing Test have_CXX__Wno_sign_compare - Success
-- Performing Test have_CXX__Wno_unused_const_variable
-- Performing Test have_CXX__Wno_unused_const_variable - Success
-- Performing Test have_C__Wno_strict_prototypes
-- Performing Test have_C__Wno_strict_prototypes - Success
-- Looking for C++ include atomic
-- Looking for C++ include atomic - found
-- Performing Test ENABLE_HWCRC32
-- Performing Test ENABLE_HWCRC32 - Success
-- Performing Test have_C__pedantic
-- Performing Test have_C__pedantic - Success
-- Performing Test have_C__Wundef
-- Performing Test have_C__Wundef - Success
-- Performing Test have_C__Wno_unused_function
-- Performing Test have_C__Wno_unused_function - Success
-- Performing Test have_C__Wno_overlength_strings
-- Performing Test have_C__Wno_overlength_strings - Success
-- Performing Test have_C__std_c89
-- Performing Test have_C__std_c89 - Success
-- Performing Test have_C__Wno_long_long
-- Performing Test have_C__Wno_long_long - Success
-- Performing Test USE_ASM_X86_64
-- Performing Test USE_ASM_X86_64 - Success
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1d") found components: Crypto 
-- Found Event component event: /usr/lib/x86_64-linux-gnu/libevent.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: filesystem system 
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: thread chrono system date_time atomic 
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.8-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.1", minimum required is "1.5")  
-- Found Boost: /usr/include (found suitable version "1.67.0", minimum required is "1.59") found components: unit_test_framework 
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK
-- Performing Test BOOST_REQUIRES_TEST_DYN_LINK - Success
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.1", minimum required is "4.1.5")  
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.6.1") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1d")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
CMake Error at doc/CMakeLists.txt:3 (add_subdirectory):
  The source directory

    /work/doc/doxygen

  does not contain a CMakeLists.txt file.


-- Configuring native build in /work/abc-ci-builds/build-without-wallet/native
-- Configuring incomplete, errors occurred!
See also "/work/abc-ci-builds/build-without-wallet/CMakeFiles/CMakeOutput.log".
See also "/work/abc-ci-builds/build-without-wallet/CMakeFiles/CMakeError.log".
Build build-without-wallet failed with exit code 1
PiRK requested changes to this revision.Oct 23 2020, 09:41
PiRK added inline comments.
doc/doxygen/Doxyfile.cmake.in
54 ↗(On Diff #24993)

doc/doxygen

This revision now requires changes to proceed.Oct 23 2020, 09:41

Fix the logo path and silent the output

This revision is now accepted and ready to land.Oct 23 2020, 10:04
This revision was automatically updated to reflect the committed changes.