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

fix: address cmake policy 148 #3013

Merged
merged 2 commits into from
Sep 19, 2023
Merged

fix: address cmake policy 148 #3013

merged 2 commits into from
Sep 19, 2023

Conversation

tswhison
Copy link
Contributor

Description

https://cmake.org/cmake/help/latest/policy/CMP0148.html

FindPythonInterp and FindPythonLibs are deprecated as of cmake 3.12. Recent cmake versions remove these altogether. The fix involves using

find_package(Python3 COMPONENTS Interpreter Development)

instead of find_package(PythonInterp and find_package(PythonLibs.

The following variable names are also updated, reflecting our dependency on Python 3:

PYTHON_EXECUTABLE -> Python3_EXECUTABLE
PYTHON_INCLUDE_DIRS -> Python3_INCLUDE_DIRS
PYTHON_LIBRARIES -> Python3_LIBRARIES

Collateral (docs, reports, design examples, case IDs):

N/A

  • Document Update Required? (Specify FIM/AFU/Scripts)

Tests added:

Tests run:

Build with OPAE_BUILD_TESTS=ON, Ubuntu 22.04.
Build with OPAE_BUILD_TESTS=ON, Fedora 36.
Build with OPAE_BUILD_TESTS=ON, Rocky Linux 9.
Build with OPAE_BUILD_TESTS=ON, OpenSUSE Tumbleweed.

https://cmake.org/cmake/help/latest/policy/CMP0148.html

FindPythonInterp and FindPythonLibs are deprecated as of cmake 3.12.
Recent cmake versions remove these altogether. The fix involves using

find_package(Python3 COMPONENTS Interpreter Development)

instead of find_package(PythonInterp and find_package(PythonLibs.

The following variable names are also updated, reflecting our depedency
on Python 3:

PYTHON_EXECUTABLE   -> Python3_EXECUTABLE
PYTHON_INCLUDE_DIRS -> Python3_INCLUDE_DIRS
PYTHON_LIBRARIES    -> Python3_LIBRARIES

Signed-off-by: Tim Whisonant <[email protected]>
@tswhison tswhison self-assigned this Sep 18, 2023
@tswhison tswhison requested review from a team as code owners September 18, 2023 23:49
@tswhison tswhison merged commit 7144009 into master Sep 19, 2023
27 checks passed
@tswhison tswhison deleted the tswhison/cmp0148 branch September 19, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants