-
Notifications
You must be signed in to change notification settings - Fork 593
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
Windows Port (WIP) #238
Windows Port (WIP) #238
Changes from all commits
77bc858
adbd24b
bf07c17
b6004c9
0325aed
87d34b9
246181d
b11a6db
73c350c
406f106
4e5a474
a9c07ec
858b38e
4778da7
188ff0a
d8d9406
3d81711
1e2c28f
d0d4fa5
0e52403
7188875
ae0e1d7
cfad43a
734a8b7
d61357f
b56eba1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,70 @@ | ||||||
// Copyright (c) 2019, Open Source Robotics Foundation, Inc. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
// All rights reserved. | ||||||
// | ||||||
// Software License Agreement (BSD License 2.0) | ||||||
// | ||||||
// Redistribution and use in source and binary forms, with or without | ||||||
// modification, are permitted provided that the following conditions | ||||||
// are met: | ||||||
// | ||||||
// * Redistributions of source code must retain the above copyright | ||||||
// notice, this list of conditions and the following disclaimer. | ||||||
// * Redistributions in binary form must reproduce the above | ||||||
// copyright notice, this list of conditions and the following | ||||||
// disclaimer in the documentation and/or other materials provided | ||||||
// with the distribution. | ||||||
// * Neither the name of Open Source Robotics Foundation, Inc. nor the names of its | ||||||
// contributors may be used to endorse or promote products derived | ||||||
// from this software without specific prior written permission. | ||||||
// | ||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||||||
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||||||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||||
// POSSIBILITY OF SUCH DAMAGE. | ||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||||
// See the License for the specific language governing permissions and | ||||||
// limitations under the License. | ||||||
|
||||||
#ifndef COLLISION_DETECTION__VISIBILITY_CONTROL_HPP_ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way to simplify the visibility logic even more? It looks like these constants don't have to be defined for each class, so maybe we could use a single header for this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we also maybe leverage rcpputils? https://github.com/ros2/rcpputils/blob/master/include/rcpputils/visibility_control.hpp There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @henningkayser We need one macro per shared lib. However, we could put them all in one header if that's preferable. It could be one large file in moveit_common which would be include logic for every shared lib. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@mikeferguson I'm not sure what you mean by leveraging rcpputils. It uses the same logic for symbol visibility but the RCPPUTILS_PUBLIC macro will switch between import and export based on whether rcpputils is the library currently being built. |
||||||
#define COLLISION_DETECTION__VISIBILITY_CONTROL_HPP_ | ||||||
|
||||||
// This logic was borrowed (then namespaced) from the examples on the gcc wiki: | ||||||
// https://gcc.gnu.org/wiki/Visibility | ||||||
|
||||||
#if defined _WIN32 || defined __CYGWIN__ | ||||||
#ifdef __GNUC__ | ||||||
#define COLLISION_DETECTION_EXPORT __attribute__ ((dllexport)) | ||||||
#define COLLISION_DETECTION_IMPORT __attribute__ ((dllimport)) | ||||||
#else | ||||||
#define COLLISION_DETECTION_EXPORT __declspec(dllexport) | ||||||
#define COLLISION_DETECTION_IMPORT __declspec(dllimport) | ||||||
#endif | ||||||
#ifdef COLLISION_DETECTION_BUILDING_LIBRARY | ||||||
#define COLLISION_DETECTION_PUBLIC COLLISION_DETECTION_EXPORT | ||||||
#else | ||||||
#define COLLISION_DETECTION_PUBLIC COLLISION_DETECTION_IMPORT | ||||||
#endif | ||||||
#define COLLISION_DETECTION_PUBLIC_TYPE COLLISION_DETECTION_PUBLIC | ||||||
#define COLLISION_DETECTION_LOCAL | ||||||
#else | ||||||
#define COLLISION_DETECTION_EXPORT __attribute__ ((visibility("default"))) | ||||||
#define COLLISION_DETECTION_IMPORT | ||||||
#if __GNUC__ >= 4 | ||||||
#define COLLISION_DETECTION_PUBLIC __attribute__ ((visibility("default"))) | ||||||
#define COLLISION_DETECTION_LOCAL __attribute__ ((visibility("hidden"))) | ||||||
#else | ||||||
#define COLLISION_DETECTION_PUBLIC | ||||||
#define COLLISION_DETECTION_LOCAL | ||||||
#endif | ||||||
#define COLLISION_DETECTION_PUBLIC_TYPE | ||||||
#endif | ||||||
|
||||||
#endif // COLLISION_DETECTION__VISIBILITY_CONTROL_HPP_ |
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.
Can't we set this as a global property? (like https://github.com/ros-planning/navigation2/pull/1704/files#diff-3f9675091693ca07439ad55ceba95229R48)
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.
@henningkayser PR #285 set's this as a global property