gazebosim / gz-cmake

A set of CMake modules that are used by the C++-based Gazebo projects.
https://gazebosim.org/libs/cmake
Apache License 2.0
24 stars 30 forks source link

ign_install_executable fails to find manpage #29

Open osrf-migration opened 6 years ago

osrf-migration commented 6 years ago

Original report (archived issue) by Nate Koenig (Bitbucket: Nathan Koenig).


The ign_install_executable calls the manpage macro. However, this macro is not defined unless the IgnRonn2Man.cmake file is included. Including IgnRonn2Man results in another error:

ignition-cmake1/cmake1/IgnRonn2Man.cmake:57 (ADD_DEPENDENCIES):
  Cannot add target-level dependencies to non-existent target "man".
osrf-migration commented 6 years ago

Original comment by Michael Grey (Bitbucket: mxgrey, GitHub: mxgrey).


IgnRonn2Man is getting included in ign_create_docs, but ign_create_docs is currently being called after the build directories are configured, because the documentation template api.in contains the variable ign_doxygen_component_input_dirs which is easiest to set while searching for component source directories.

I expect this can be fixed by moving the include(IgnRonn2Man) call out of ign_create_docs() and putting it closer to the top of ign_configure_build().

Is there a good project/branch for me to test the fix against?

osrf-migration commented 6 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


Test pull request: https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/5

Specifically: https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gazebo/pull-requests/5/server/diff#Lsrc/CMakeLists.txtT33

osrf-migration commented 6 years ago

Original comment by Michael Grey (Bitbucket: mxgrey, GitHub: mxgrey).


After a little rearranging, it has no problem with configuring and building, but the install step ends up producing this error message:

CMake Error at src/cmake_install.cmake:143 (file):
  file INSTALL cannot find
  "/home/grey/projects/ignition/ign-gazebo/build/src/ign-gazebo.1.gz".

I'm not familiar with generating and installing manuals, but it looks like ign_install_executable(~) expects to find some zipped file with the name <target_name>.1.gz, but we're never producing such a file.

The manpage(~) macro seems to expect a file named ign-gazebo in the ign-gazebo/src directory, which it would then convert into ign-gazebo.1.ronn, and then to ign-gazebo.1.gz. But the ign-gazebo PR 5 doesn't currently provide any file like ign-gazebo/src/ign-gazebo, and that seems to be the cause of this failure.

Is that the expected behavior? I can change the way our manpage generation macros work, but I'm not clear on exactly how we want it to behave.

osrf-migration commented 6 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


It's good practice to have a manpage for every installed executable. I think this can be a warning instead of an error.