-
Notifications
You must be signed in to change notification settings - Fork 486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Windows build when using vcpkg #3132
Conversation
sorry I just introduced some conflicts by merging #3138. do you mind resolving them? |
actually let me try |
cmake/GazeboUtils.cmake
Outdated
@@ -181,7 +181,7 @@ macro (gz_setup_windows) | |||
endif() | |||
|
|||
if (MSVC) | |||
add_compile_options(/Zc:__cplusplus) | |||
add_compile_options(/Zc:__cplusplus /permissive- /Zc:strictStrings-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the windows CI build is broken; I'm guessing it's related to this change?
[ 43%] Building CXX object gazebo/transport/CMakeFiles/gazebo_transport.dir/IOManager.cc.obj
C:\Jenkins\workspace\gazebo-ci-pr_any-windows7-amd64\ws\install\include\boost/interprocess/detail/win32_api.hpp(892): error C2116: 'GetProcessTimes': function parameter lists do not match between declarations
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\processthreadsapi.h(106): note: see declaration of 'GetProcessTimes'
C:\Jenkins\workspace\gazebo-ci-pr_any-windows7-amd64\ws\install\include\boost/interprocess/detail/win32_api.hpp(892): error C2733: 'GetProcessTimes': you cannot overload a function with 'extern "C"' linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\processthreadsapi.h(106): note: see declaration of 'GetProcessTimes'
C:\Jenkins\workspace\gazebo-ci-pr_any-windows7-amd64\ws\install\include\boost/interprocess/detail/win32_api.hpp(908): error C2371: 'GetFileType': redefinition; different basic types
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\fileapi.h(708): note: see declaration of 'GetFileType'
C:\Jenkins\workspace\gazebo-ci-pr_any-windows7-amd64\ws\install\include\boost/interprocess/detail/win32_api.hpp(908): error C2733: 'GetFileType': you cannot overload a function with 'extern "C"' linkage
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a change. Hopefully that should fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are test failures, but those seem to have been happening for a while. Both tests seem to fail because they are using command not available on Windows cmd (make
and rm
). Would it be worth modifying them or removing them?
looks ok to me. What do you think @traversaro ? |
Ok for me! |
Here are a list of changes I had to make to get Gazebo building on Windows when using vcpkg for dependencies:
TO_NATIVE_PATH
for the default system paths forGAZEBO_PLUGIN_PATH
,GAZEBO_MODEL_PATH
, andGAZEBO_RESOURCE_PATH
uses\
for the path separation characters without escaping and although escaping isn't required in CMake, it needs to be escaped in the C++ code. Therefore, I changed it toTO_CMAKE_PATH
so the path separation character is always/
./permissive-
is needed to fix a dart error as described here/Zc:strictStrings-
is needed in order to assign achar*
with a string inode/misc.h
DIFFERENCE
is a macro defined by a Windows header and needs to be undefed in order to be used in MeshCSG.hh