[openrtm-staff:748] Re: 7/19の作業報告(河内)

Ando Noriaki n-ando @ aist.go.jp
2017年 7月 19日 (水) 21:44:37 JST


河内様

安藤です

現状 CMakeのprojectの第2引数は C, CXX, Fortran, ASMくらいしか
影響がなようなのでなくてもよいと思います。
https://github.com/Kitware/CMake/tree/master/Modules/Platform



2017年7月19日 17:45 河内 のぶ <n-kawauchi @ openrtm.org>:

> 安藤様
>
> 河内です
>
> 本日の作業内容をお知らせします。
> -----------
> ■OpenRTPのチケット動作確認
> インストールされているOpenRTM-aistのバージョン番号取得処理を見直す
> http://redmine.openrtm.org/issues/4132
>
> ・c++, python それぞれのテンプレートに下記を追加して頂いたが、
> Linux環境のpythonだけこれが動かない。cmakeが通らないということ。
> -----
> find_package(OpenRTM)
> set(RTM_VER ${OPENRTM_VERSION})
> set(RTM_SHORT_VER
> ${OPENRTM_VERSION_MAJOR}${OPENRTM_VERSION_MINOR}${OPENRTM_VERSION_PATCH})
> -----
>
> ・RTCBuilderでc++, pythonそれぞれのプロジェクトを生成し、msi, deb
> パッケージを生成してのインストール動作を確認した
> ・Windows環境では問題なかったが、Linux環境でもc++は問題なかった
>
> ・原因は今回の修正とは関係ないCMakeLists.txt内のproject文の設定
> ・c++の場合は「project(cxx_test)」のようになるが、pythonの場合は
> 「project(py_test NONE)」となる
>
> ・影響しているのは「NONE」指定です。この第2引数は言語指定で、
> デフォルトが C and CXX です。
> このNONE指定があるため、OpenRTMConfig.cmakeを見つけられません。
>
> cmake2.8.0のドキュメントには以下と書いてあります。
> By using the special language "NONE" all checks for any language can
> be disabled.
>
>   cmake3.0.2と3.9.0は同じ内容で以下とありました。
> Specify language NONE, or use the LANGUAGES keyword and list no languages,
> to skip enabling any languages.
>
> ⇒この内容からするとPythonでNONEを指定しなくてもよいと思えるので、
> 外したいのですが、いかがでしょうか。
> NONE指定を外せばcmakeが通り、make doc, cpackの動作もOKでした。
>
> 動作確認の詳細は後述します。
>
> ■サマーキャンプ懇親会の準備
> ・開始しました。。。
>
> ****** cmakeの動作確認詳細 ******
>
> 簡単なCMakeLists.txtを用意して動作確認した結果が以下です。
>
> cxx_test/
> CMakeLists.txt
> build
>
> py_test/
> CMakeLists.txt
> build
>
> ・cxx_test/CMakeLists.txt
> -----
> cmake_minimum_required(VERSION 3.0.2)
>
> project(cxx_test) ←★NONEなし
>
> find_package(OpenRTM)
> set(RTM_VER ${OPENRTM_VERSION})
> set(RTM_SHORT_VER
> ${OPENRTM_VERSION_MAJOR}${OPENRTM_VERSION_MINOR}${OPENRTM_VERSION_PATCH})
> -----
>
> ・py_test/CMakeLists.txt
> -----
> cmake_minimum_required(VERSION 3.0.2)
>
> project(py_test NONE) ←★NONEあり
>
> find_package(OpenRTM)
> set(RTM_VER ${OPENRTM_VERSION})
> set(RTM_SHORT_VER
> ${OPENRTM_VERSION_MAJOR}${OPENRTM_VERSION_MINOR}${OPENRTM_VERSION_PATCH})
> -----
>
> ・上記設定でcmakeに「-DCMAKE_FIND_DEBUG_MODE=1」オプションを付けて実行
> するとOpenRTMConfig.cmakeの探索の様子が分かります
>
> ・cxx_test
> -----
> $ cmake .. -DCMAKE_FIND_DEBUG_MODE=1
> Checking prefix [/usr/local/]
> Checking file [/usr/local/OpenRTMConfig.cmake]
> Checking file [/usr/local/openrtm-config.cmake]
> Checking prefix [/usr/]
> Checking file [/usr/OpenRTMConfig.cmake]
> Checking file [/usr/openrtm-config.cmake]
> Checking file [/usr/lib/x86_64-linux-gnu/openrtm-1.2/OpenRTMConfig.cmake]
> Checking file [/usr/lib/x86_64-linux-gnu/openrtm-1.2/openrtm-config.cmake]
> Checking file [/usr/share/openrtm-1.2/OpenRTMConfig.cmake]
> Checking file [/usr/share/openrtm-1.2/openrtm-config.cmake]
> Checking file [/usr/lib/x86_64-linux-gnu/openrtm-1.2/cmake/
> OpenRTMConfig.cmake]
> -- OpenRTMConfig.cmake found.
> -- Configrued by configuration mode.
> -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
> -- Checking for module 'omniORB4'
> --   Found omniORB4, version 4.1.6
> -- OpenRTM-aist configuration done
> -- Configuring done
> -- Generating done
>
> ・py_test
> -----
> $ cmake .. -DCMAKE_FIND_DEBUG_MODE=1
> Checking prefix [/usr/local/]
> Checking file [/usr/local/OpenRTMConfig.cmake]
> Checking file [/usr/local/openrtm-config.cmake]
> Checking prefix [/usr/]
> Checking file [/usr/OpenRTMConfig.cmake]
> Checking file [/usr/openrtm-config.cmake]
> Checking file [/usr/share/openrtm-1.2/OpenRTMConfig.cmake]
> Checking file [/usr/share/openrtm-1.2/openrtm-config.cmake]
> Checking prefix [/]
> Checking file [/OpenRTMConfig.cmake]
> Checking file [/openrtm-config.cmake]
> Checking prefix [/usr/games/]
> Checking file [/usr/games/OpenRTMConfig.cmake]
> Checking file [/usr/games/openrtm-config.cmake]
> Checking prefix [/usr/local/games/]
> Checking file [/usr/local/games/OpenRTMConfig.cmake]
> Checking file [/usr/local/games/openrtm-config.cmake]
> Checking prefix [/snap/]
> Checking file [/snap/OpenRTMConfig.cmake]
> Checking file [/snap/openrtm-config.cmake]
> CMake Warning at CMakeLists.txt:12 (find_package):
>   By not providing "FindOpenRTM.cmake" in CMAKE_MODULE_PATH this project
> has
>   asked CMake to find a package configuration file provided by "OpenRTM",
> but
>   CMake did not find one.
>
>   Could not find a package configuration file provided by "OpenRTM" with
> any
>   of the following names:
>
>     OpenRTMConfig.cmake
>     openrtm-config.cmake
>
>   Add the installation prefix of "OpenRTM" to CMAKE_PREFIX_PATH or set
>   "OpenRTM_DIR" to a directory containing one of the above files.  If
>   "OpenRTM" provides a separate development package or SDK, be sure it has
>   been installed.
>
>
> -- Configuring done
> -- Generating done
>
> ・以上からNONEを指定するとc++のパスは除外されているように見えます
> ・Windows環境でCMakeを実行すると、NONE指定があってもOpenRTMConfig.cmake
> を見つけることができています。
>
> 以上です。
>
> --
> ------------------------------------------------------------------------
> 河内 のぶ        n-kawauchi @ openrtm.org
>
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://www.openrtm.org/pipermail/openrtm-staff/attachments/20170719/41d864a6/attachment-0001.html>


More information about the openrtm-staff mailing list