Skip to content

[Windows][melodic-devel] Fix Windows\MSVC build breaks#357

Merged
v4hn merged 5 commits intomoveit:melodic-develfrom
ms-iot:windows_fix
Jul 30, 2019
Merged

[Windows][melodic-devel] Fix Windows\MSVC build breaks#357
v4hn merged 5 commits intomoveit:melodic-develfrom
ms-iot:windows_fix

Conversation

@seanyen
Copy link
Copy Markdown
Contributor

@seanyen seanyen commented Jul 11, 2019

This changes is to fix build breaks on Windows/MSVC and issues found at runtime:

  • Use set(CMAKE_CXX_STANDARD 14) to regulate the compiler to use C+14 standard in a portable way.
  • Add ARCHIVE DESTINATION and RUNTIME DESTINATION for shared library install since they are required for Windows build.
  • Use ros::Duration(1.0).sleep(); over sleep() to make the code more portable.
  • Correct $(find xacro)/xacro.py to $(find xacro)/xacro because xacro seems no longer to install xacro.py to the package bin folder: https://github.com/ros/xacro/blob/melodic-devel/CMakeLists.txt#L15

@welcome
Copy link
Copy Markdown

welcome Bot commented Jul 11, 2019

Thanks for helping in improving MoveIt!

@gavanderhoorn
Copy link
Copy Markdown
Member

Similar comments about commit msgs and quote changes as in moveit/panda_moveit_config#32.

@seanyen
Copy link
Copy Markdown
Contributor Author

seanyen commented Jul 11, 2019

@gavanderhoorn Thanks for the feedback! I pushed again with more meaningful commit messages and removed the double quotes change. I will be looking into what I can do at roslaunch side, and close moveit/panda_moveit_config#32 for now.

@gavanderhoorn
Copy link
Copy Markdown
Member

[..] and removed the double quotes change. I will be looking into what I can do at roslaunch side, and close ros-planning/panda_moveit_config#32 for now.

thanks.

let us know whether getting something into roslaunch is feasible.

Otherwise we'll have to start changing MoveIt launch files "everywhere" I guess (and the templates used by the MoveIt Setup Assistant).

Copy link
Copy Markdown
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, this looks good. Some remarks though.

Comment thread CMakeLists.txt
project(moveit_tutorials)

add_compile_options(-std=c++14)
set(CMAKE_CXX_STANDARD 14)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMAKE_CXX_STANDARD was introduced in cmake 3.1. Using it here, cmake_minimum_required should be increased as well!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we change to this way of specifying the standard, I would propose to

  • (1) Do it consistently throughout MoveIt (esp. for the main repository too)
  • (2) set( CMAKE_CXX_EXTENSIONS OFF ) too

Please see this old thread for a discussion on the various ways to specify the standard.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the cmake_minimum_required and added set( CMAKE_CXX_EXTENSIONS OFF ) here. And I agreed that it should be done consistently throughout Moveit repositories.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have the cycles to contribute this style-change all throughout the main repository too?
It would be very much appreciated... (but independent of this request)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v4hn you mean this https://github.com/ros-planning/moveit repository, right? Sure I can do it.

Comment thread doc/interactivity/CMakeLists.txt Outdated
${CATKIN_PACKAGE_SHARE_DESTINATION}
ARCHIVE
DESTINATION
${CATKIN_PACKAGE_SHARE_DESTINATION}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be probably LIB resp. BIN, shouldn't it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This library is not installed properly and its headers are also not exported.
I would propose to install the library to CATKIN_PACKAGE_LIB_DESTINATION (I guess that's an oversight by @mlautman ), but not install the headers at all.
After all we don't want people to depend on a library from the tutorials package.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm cleaning this up as part of #355 right now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rebased to get the latest cleanup.

@seanyen
Copy link
Copy Markdown
Contributor Author

seanyen commented Jul 20, 2019

@rhaschke @v4hn I sent another iteration to address the feedback. Please kindly take a look!

Copy link
Copy Markdown
Contributor

@v4hn v4hn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one last potential issue, otherwise I approve.

This should be merged to master too.

I consider these commits to address independent issues, so it would be nice to keep the individual commits in the history.

Comment thread CMakeLists.txt
project(moveit_tutorials)

add_compile_options(-std=c++14)
set(CMAKE_CXX_STANDARD 14)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have the cycles to contribute this style-change all throughout the main repository too?
It would be very much appreciated... (but independent of this request)

Comment thread doc/interactivity/CMakeLists.txt Outdated
Copy link
Copy Markdown
Member

@davetcoleman davetcoleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After @v4hn 's requests are addressed. Thanks @seanyen !

seanyen added 3 commits July 30, 2019 13:39
as required by the MoveIt maintainers,
enforce strict standard through `CMAKE_CXX_EXTENSIONS OFF`
@v4hn v4hn merged commit 1786e10 into moveit:melodic-devel Jul 30, 2019
@welcome
Copy link
Copy Markdown

welcome Bot commented Jul 30, 2019

Congrats on getting your first MoveIt! pull request merged and improving open source robotics!

@v4hn
Copy link
Copy Markdown
Contributor

v4hn commented Jul 30, 2019

Thanks @seanyen,
A followup-request for using CXX_STANDARD in https://github.com/ros-planning/moveit is very welcome! 🏅

One minor issue: Instead of pushing multiple fixup commits over time to address requested changes, please feel free to force-push the branch and clean up the original commits.
You need to write a manual reply to the review in this case, but we don't need to cleanup your history if the request might be merged without squashing.

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.

5 participants