Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building using cmake >= 3.27.1 #1015

Open
DKatz96 opened this issue Aug 8, 2023 · 1 comment
Open

Error building using cmake >= 3.27.1 #1015

DKatz96 opened this issue Aug 8, 2023 · 1 comment

Comments

@DKatz96
Copy link

DKatz96 commented Aug 8, 2023

I was trying to build from source for the jetson xavier dev kit (arm64) and was unable to build using cmake 3.27.1.

The following warning appeared:

CMake Warning (dev) at CMakeLists.txt:39 (include):
  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.

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake provides the following information regarding this issue:

cmake --help-policy CMP0148
CMP0148
-------

.. versionadded:: 3.27

The ``FindPythonInterp`` and ``FindPythonLibs`` modules are removed.

These modules have been deprecated since CMake 3.12.
CMake 3.27 and above prefer to not provide the modules.
This policy provides compatibility for projects that have not been
ported away from them.

Projects using the ``FindPythonInterp`` and/or ``FindPythonLibs``
modules should be updated to use one of their replacements:

* ``FindPython3``
* ``FindPython2``
* ``FindPython``

The ``OLD`` behavior of this policy is for ``find_package(PythonInterp)``
and ``find_package(PythonLibs)`` to load the deprecated modules.  The ``NEW``
behavior is for uses of the modules to fail as if they do not exist.

This policy was introduced in CMake version 3.27.  CMake version
3.27.1 warns when the policy is not set and uses ``OLD`` behavior.
Use the ``cmake_policy()`` command to set it to ``OLD`` or ``NEW``
explicitly.

.. note::
  The ``OLD`` behavior of a policy is
  ``deprecated by definition``
  and may be removed in a future version of CMake.

Replacing include(FindPythonInterp) with include(FindPython3) in CMakeLists.txt as recommended fixes the issue. Maybe this can be updated for future releases?

@ryandesign
Copy link

Just to clarify: your issue title says "Error building" but you haven't described an error; you've described a warning. This warning doesn't prevent the software from building, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants