OpenRTM / OpenRTP-aist

OpenRTP-aist: RT-Middleware and OMG RTC based component and system development tools implemented by AIST
Other
1 stars 6 forks source link

[RTCB] Python RTCのcmake policy設定を見直す #389

Closed n-kawauchi closed 9 months ago

n-kawauchi commented 3 years ago

Is your feature request related to a problem? Please describe.

CMake Deprecation Warning at CMakeLists.txt:6 (cmake_policy): The OLD behavior for policy CMP0053 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.



**Describe the solution you'd like**
- CMP0040 に関しては、add_custom_command の定義に関するもので、上記ポリシーを定義しないとエラーになる
- ImageProcessingのTkCalibGUIではCMP0040を定義していないので、このadd_custom_commandは参考になりそう
ga-sakamoto commented 3 years ago

こちらはどのように修正すればよろしいでしょうか? cmake_policyの部分を全て削除する形になるのでしょうか? また,mainとRELENG_1_2の両方で修正する必要がありますでしょうか?

n-kawauchi commented 3 years ago

修正方法についてはこれから検討する必要があるということで、Assigneesを自分にしました。 現時点の設定ではワーニングが出るということでRTCの起動には影響ありませんので、優先順位は高くありません。 修正方法が決まりましたらここへ追記します。 今のところ修正対象はmasterブランチのみになると考えています。

n-kawauchi commented 10 months ago

一番トップのCMakeLists.txtのcmake_policy(計6行)全てを削除してください。削除したソースで下記環境にてワーニングが出ないことを確認しました。 Windows10(cmake3.23.2)、Ubuntu20.04(cmake3.16.3)、Ubuntu22.04(cmake3.22.1)

合わせて「cmake_minimum_required(VERSION 2.8)」もワーニングがでますので、バージョン番号をC++と同じ3.5.1に修正してください。