Skip to content
Permalink
Browse files

doc: CMake: Locate Python executable before processing modules

The module processing logic in Zephyr requires Python, since it uses a
Python script to locate and process the modules. It is therefore
required to find the Python executable using CMake before actually
including the CMake script that processes the modules. In order to
prevent this from happening again, move the inclusion of version.cmake
as well in case that script chooses to use Python in the future.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
  • Loading branch information...
carlescufi committed May 23, 2019
1 parent b73790b commit f5f1b22c5ada0d6c81d41f04804e3820e02c2f36
Showing with 5 additions and 5 deletions.
  1. +5 −5 doc/CMakeLists.txt
@@ -16,11 +16,6 @@ file(TO_CMAKE_PATH "$ENV{ZEPHYR_BASE}" ZEPHYR_BASE)

message(STATUS "Zephyr base: ${ZEPHYR_BASE}")

include(${ZEPHYR_BASE}/cmake/version.cmake)

# Process modules
include(${ZEPHYR_BASE}/cmake/zephyr_module.cmake)

find_package(PythonInterp 3.4)
set(DOXYGEN_SKIP_DOT True)
find_package(Doxygen REQUIRED)
@@ -34,6 +29,11 @@ if(${SPHINXBUILD} STREQUAL SPHINXBUILD-NOTFOUND)
message(FATAL_ERROR "The 'sphinx-build' command was not found. Make sure you have Sphinx installed.")
endif()

# Include version info
include(${ZEPHYR_BASE}/cmake/version.cmake)
# Process modules
include(${ZEPHYR_BASE}/cmake/zephyr_module.cmake)

# Note that this won't force fatal error if latexmk is not found.
# Not having LaTeX tools should not prevent people from generating HTML docs.
find_program(

0 comments on commit f5f1b22

Please sign in to comment.
You can’t perform that action at this time.