Re: We need to remove exec_program() from our Cmake files

2023-10-28 Thread Milian Wolff
On Donnerstag, 26. Oktober 2023 07:27:54 CEST Johnny Jazeix wrote:
> Hi,
> 
> for the list:
> https://lxr.kde.org/search?%21v=kf5-qt5&_filestring=&_string=exec_program&_c
> asesensitive=1

A lot of these should be trivial to port. For `chmod` e.g. there's now 
`file(CHMOD ...)` [1], similarly there's also `file(REMOVE ...)`. Anything 
related to pkgconfig should go through `pkg_check_modules` [2]. And for the 
remaining bits, using `execute_process` should be straight forward I hope.

Cheers

[1]: https://cmake.org/cmake/help/latest/command/file.html#chmod
[2]: https://cmake.org/cmake/help/latest/module/FindPkgConfig.html
-- 
Milian Wolff
m...@milianw.de
http://milianw.de

signature.asc
Description: This is a digitally signed message part.


Re: We need to remove exec_program() from our Cmake files

2023-10-25 Thread David Redondo
Am Donnerstag, 26. Oktober 2023, 03:49:57 CEST schrieb Ömer Fadıl USTA:
> 
> ```
> The exec_program()
>  rogram> command, which has been deprecated since CMake 3.0, has been removed
> by policy CMP0153
> .
> Use the execute_process()
>  cute_process> command instead.
> ```
This is behind a policy so if we don't have

cmake_minimum_required(VERSION 3.28)

in my understanding we can continue to call it for now and not have to rush 
though it.
Otherwise we would have to change things every time a policy changes behavior.

David





Re: We need to remove exec_program() from our Cmake files

2023-10-25 Thread Johnny Jazeix
Hi,

for the list:
https://lxr.kde.org/search?%21v=kf5-qt5&_filestring=&_string=exec_program&_casesensitive=1

Cheers,
Johnny

Le jeu. 26 oct. 2023 à 05:10, Ömer Fadıl USTA  a écrit :

> We need to hurry to remove exec_program() from our cmake files because
> It will be removed with the upcoming CMake's 3.28.0 version which is really
> near to release. ( Just 2 hours ago its rc3 was released ).
> And from a quick search for our repo ( with ripgrep) I have seen that we
> got at least 18 repo using that execure_program(...)
>
> CMake Release Notes :
> https://cmake.org/cmake/help/v3.28/release/3.28.html#deprecated-and-removed-features
>
> ```
> The exec_program()
> 
> command, which has been deprecated since CMake 3.0, has been removed by
> policy CMP0153
> .
> Use the execute_process()
> 
> command instead.
> ```
>
>
> [Sorry for cross post to kde-devel and kde-core-devel ]
>
> Ömer Fadıl Usta
> PGP key : 0xfd11561976b1690b
> about.me/omerusta
>