Skip to content

Update FindSphinx.cmake #1549

@AnHeuermann

Description

@AnHeuermann

Description

FindSphinx.cmake is using removed features:

CMake Warning (dev) at config.cmake/FindSphinx.cmake:145 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  doc/CMakeLists.txt:3 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

Steps to reproduce the behavior

Use a new-ish version of CMake to configure, e.g. by using Docker image ghcr.io/openmodelica/build-deps:v1.26.0:

cmake -S . -B build_cmake

Suggested changes

  • Change find_package(PythonInterp QUIET) to find_package(Python3 QUIET COMPONENTS Interpreter)
  • Chnage ${PYTHON_EXECUTABLE} to {Python3_EXECUTABLE}

If we find a good solution we could upstream it to https://github.com/cmake-basis/find-modules/blob/master/FindSphinx.cmake where the file originally comes from.

Version and OS

  • Version: OMSimulator v3.0.0.post119-gef71d82-linux-debug
  • OS: Ubuntu 24.04.3 LTS
  • cmake version 3.28.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions