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

cmake: Replace deprecated exec_program() with execute_process() #1221

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dNechita
Copy link
Contributor

PR Description

exec_program() has been deprecared. This PR updates a cmake file to use execute_process() instead.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have commented new code, particulary complex or unclear areas
  • I have checked that I did not intoduced new warnings or errors (CI output)
  • I have checked that components that use libiio did not get broken
  • I have updated the documentation accordingly (GitHub Pages, READMEs, etc)

Invoking the uninstall target causes warning messages about using
deprecated exec_program() such as:
"sudo make uninstall
-- Uninstalling /usr/lib/x86_64-linux-gnu/pkgconfig/libiio.pc
CMake Warning (dev) at cmake_uninstall.cmake:49 (exec_program):
  Policy CMP0153 is not set: The exec_program command should not be called.
  Run "cmake --help-policy CMP0153" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
"

Used cmake version 3.28.3.

Signed-off-by: Dan Nechita <[email protected]>
@rgetz
Copy link
Contributor

rgetz commented Dec 24, 2024

It might be nice to point to the cmake doc in the commit message.

https://cmake.org/cmake/help/latest/command/exec_program.html
Deprecated since version 3.0

since we are cmake_minimum_required(VERSION 3.10) This should not be a problem anywhere.

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

Successfully merging this pull request may close these issues.

2 participants