Autoware.Auto
common/state_vector/include/state_vector/visibility_control.hpp
Go to the documentation of this file.
1 // Copyright 2021 Apex.AI, Inc.
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 // All rights reserved.
15 
16 #ifndef STATE_VECTOR__VISIBILITY_CONTROL_HPP_
17 #define STATE_VECTOR__VISIBILITY_CONTROL_HPP_
18 
20 #if defined(__WIN32)
21  #if defined(STATE_VECTOR_BUILDING_DLL) || defined(STATE_VECTOR_EXPORTS)
22  #define STATE_VECTOR_PUBLIC __declspec(dllexport)
23  #define STATE_VECTOR_LOCAL
24  #else // defined(STATE_VECTOR_BUILDING_DLL) || defined(STATE_VECTOR_EXPORTS)
25  #define STATE_VECTOR_PUBLIC __declspec(dllimport)
26  #define STATE_VECTOR_LOCAL
27  #endif // defined(STATE_VECTOR_BUILDING_DLL) || defined(STATE_VECTOR_EXPORTS)
28 #elif defined(__linux__)
29  #define STATE_VECTOR_PUBLIC __attribute__((visibility("default")))
30  #define STATE_VECTOR_LOCAL __attribute__((visibility("hidden")))
31 #elif defined(__APPLE__)
32  #define STATE_VECTOR_PUBLIC __attribute__((visibility("default")))
33  #define STATE_VECTOR_LOCAL __attribute__((visibility("hidden")))
34 #else // defined(__linux__)
35  #error "Unsupported Build Configuration"
36 #endif // defined(__WIN32)
37 
38 #endif // STATE_VECTOR__VISIBILITY_CONTROL_HPP_