Autoware.Auto
localization/localization_nodes/include/localization_nodes/visibility_control.hpp
Go to the documentation of this file.
1 // Copyright 2019 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 #ifndef LOCALIZATION_NODES__VISIBILITY_CONTROL_HPP_
18 #define LOCALIZATION_NODES__VISIBILITY_CONTROL_HPP_
19 
20 
22 #if defined(__WIN32)
23 #if defined(LOCALIZATION_NODES_BUILDING_DLL) || defined(LOCALIZATION_NODES_EXPORTS)
24  #define LOCALIZATION_NODES_PUBLIC __declspec(dllexport)
25  #define LOCALIZATION_NODES_LOCAL
26  #else // defined(LOCALIZATION_NODES_BUILDING_DLL) || defined(LOCALIZATION_NODES_EXPORTS)
27  #define LOCALIZATION_NODES_PUBLIC __declspec(dllimport)
28  #define LOCALIZATION_NODES_LOCAL
29  #endif // defined(LOCALIZATION_NODES_BUILDING_DLL) || defined(LOCALIZATION_NODES_EXPORTS)
30 #elif defined(__linux__)
31 #define LOCALIZATION_NODES_PUBLIC __attribute__((visibility("default")))
32  #define LOCALIZATION_NODES_LOCAL __attribute__((visibility("hidden")))
33 #elif defined(__APPLE__)
34 #define LOCALIZATION_NODES_PUBLIC __attribute__((visibility("default")))
35  #define LOCALIZATION_NODES_LOCAL __attribute__((visibility("hidden")))
36 #else // defined(_LINUX)
37 #error "Unsupported Build Configuration"
38 #endif // defined(_WINDOWS)
39 
40 #endif // LOCALIZATION_NODES__VISIBILITY_CONTROL_HPP_