From af5ebb445d15b66b73b58f0b107e3d9338192076 Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Thu, 23 Aug 2018 22:46:02 +0200 Subject: [PATCH 1/2] FindSphinx.cmake: Fix for newer sphinx versions Newer Sphinx versions do not output 'Sphinx (sphinx-build) x.x.x' but only 'sphinx-build x.x.x'. This is a pretty simplistic solution, maybe someone can find a better FindSphinx.cmake module entirely. Signed-off-by: Brendan Le Foll --- cmake/modules/FindSphinx.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindSphinx.cmake b/cmake/modules/FindSphinx.cmake index 528b107c0..a9ffb861a 100644 --- a/cmake/modules/FindSphinx.cmake +++ b/cmake/modules/FindSphinx.cmake @@ -17,10 +17,13 @@ if (SPHINX_EXECUTABLE) OUTPUT_VARIABLE SPHINX_VERSION_STRING OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) - if (SPHINX_VERSION_STRING) + if (SPHINX_VERSION_STRING MATCHES "^Sphinx") string(REPLACE "Sphinx (sphinx-build) " "" SPHINX_VERSION ${SPHINX_VERSION_STRING}) - message (STATUS "Sphinx version is ${SPHINX_VERSION}") + else () + # newer sphinx builds just say sphinx-build + string(REPLACE "sphinx-build " "" SPHINX_VERSION ${SPHINX_VERSION_STRING}) endif () + message (STATUS "Sphinx version is ${SPHINX_VERSION}") endif () mark_as_advanced (SPHINX_EXECUTABLE) From 236c63c502a4be56fb8f2263a120b5a0cae839dc Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Thu, 23 Aug 2018 23:32:18 +0200 Subject: [PATCH 2/2] python2/CMakeLists.txt: make SWIG doc interfaces depend on wrapper gen Previously we used SWIG_MODULE__REAL_NAME to have the doc interfaces depend on. However that target is preceeded by the SWIG generation in our case gen_python2-mraa_mraa2PYTHON_wrap. Typically this is hidden because a parralel build has so many other deps this can be hidden but this is the correct path. Fixes #911 Signed-off-by: Brendan Le Foll --- src/python/python2/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/python2/CMakeLists.txt b/src/python/python2/CMakeLists.txt index 41d18b2a8..5f254849e 100644 --- a/src/python/python2/CMakeLists.txt +++ b/src/python/python2/CMakeLists.txt @@ -18,9 +18,9 @@ target_include_directories(${SWIG_MODULE_python2-mraa_REAL_NAME} if (DOXYGEN_FOUND AND PYTHON2_EXECUTABLE) foreach (_file ${DOCCLASSES}) - add_dependencies (${SWIG_MODULE_python2-mraa_REAL_NAME} ${_file}class_doc_i) + add_dependencies (gen_python2-mraa_mraa2PYTHON_wrap ${_file}class_doc_i) endforeach () - add_dependencies (${SWIG_MODULE_python2-mraa_REAL_NAME} common_hpp_doc_i) + add_dependencies (gen_python2-mraa_mraa2PYTHON_wrap common_hpp_doc_i) endif () set_target_properties (${SWIG_MODULE_python2-mraa_REAL_NAME} PROPERTIES