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

Merged
merged 1 commit into from
Jan 21, 2025

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)

@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.

@dNechita
Copy link
Contributor Author

dNechita commented Jan 9, 2025

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.

Make sense. I will update the commit message. Thanks, Robin!

@dNechita dNechita force-pushed the cmake_uninstall_update branch from dc2317f to b076a17 Compare January 9, 2025 10:38
@dNechita
Copy link
Contributor Author

dNechita commented Jan 9, 2025

V2:

  • Updated commit message to reference cmake documentation

exec_program() has been deprecated since version 3.0. See here:
https://cmake.org/cmake/help/latest/command/exec_program.html

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 <dan.nechita@analog.com>
@dNechita dNechita force-pushed the cmake_uninstall_update branch from b076a17 to 55a348f Compare January 13, 2025 11:29
@cristina-suteu cristina-suteu merged commit 3edff24 into main Jan 21, 2025
24 checks passed
@cristina-suteu cristina-suteu deleted the cmake_uninstall_update branch January 21, 2025 10:38
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.

3 participants