Autoware.Auto
common/motion_model/include/motion_model/visibility_control.hpp
Go to the documentation of this file.
1 // Copyright 2018 the Autoware Foundation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //    http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 // Co-developed by Tier IV, Inc. and Apex.AI, Inc.
16 
17 // Copyright 2017-2018 the Autoware Foundation
18 // All rights reserved.
19 
20 #ifndef MOTION_MODEL__VISIBILITY_CONTROL_HPP_
21 #define MOTION_MODEL__VISIBILITY_CONTROL_HPP_
22 
24 #if defined(__WIN32)
25  #if defined(MOTION_MODEL_BUILDING_DLL) || defined(MOTION_MODEL_EXPORTS)
26  #define MOTION_MODEL_PUBLIC __declspec(dllexport)
27  #define MOTION_MODEL_LOCAL
28  #else // defined(MOTION_MODEL_BUILDING_DLL) || defined(MOTION_MODEL_EXPORTS)
29  #define MOTION_MODEL_PUBLIC __declspec(dllimport)
30  #define MOTION_MODEL_LOCAL
31  #endif // defined(MOTION_MODEL_BUILDING_DLL) || defined(MOTION_MODEL_EXPORTS)
32 #elif defined(__linux__)
33  #define MOTION_MODEL_PUBLIC __attribute__((visibility("default")))
34  #define MOTION_MODEL_LOCAL __attribute__((visibility("hidden")))
35 #elif defined(__APPLE__)
36  #define MOTION_MODEL_PUBLIC __attribute__((visibility("default")))
37  #define MOTION_MODEL_LOCAL __attribute__((visibility("hidden")))
38 #else // defined(__linux__)
39  #error "Unsupported Build Configuration"
40 #endif // defined(__WIN32)
41 
42 #endif // MOTION_MODEL__VISIBILITY_CONTROL_HPP_