Autoware.Auto
control/mpc_controller_nodes/include/mpc_controller_nodes/visibility_control.hpp
Go to the documentation of this file.
1 // Copyright 2019 Christopher Ho
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 #ifndef MPC_CONTROLLER_NODES__VISIBILITY_CONTROL_HPP_
16 #define MPC_CONTROLLER_NODES__VISIBILITY_CONTROL_HPP_
17 
18 #if defined(__WIN32)
19  #if defined(MPC_CONTROLLER_NODES_BUILDING_DLL) || defined(MPC_CONTROLLER_NODES_EXPORTS)
20  #define MPC_CONTROLLER_NODES_PUBLIC __declspec(dllexport)
21  #define MPC_CONTROLLER_NODES_LOCAL
22  #else // defined(MPC_CONTROLLER_NODES_BUILDING_DLL) || defined(MPC_CONTROLLER_NODES_EXPORTS)
23  #define MPC_CONTROLLER_NODES_PUBLIC __declspec(dllimport)
24  #define MPC_CONTROLLER_NODES_LOCAL
25  #endif // defined(MPC_CONTROLLER_NODES_BUILDING_DLL) || defined(MPC_CONTROLLER_NODES_EXPORTS)
26 #elif defined(__linux__)
27  #define MPC_CONTROLLER_NODES_PUBLIC __attribute__((visibility("default")))
28  #define MPC_CONTROLLER_NODES_LOCAL __attribute__((visibility("hidden")))
29 #elif defined(__APPLE__)
30  #define MPC_CONTROLLER_NODES_PUBLIC __attribute__((visibility("default")))
31  #define MPC_CONTROLLER_NODES_LOCAL __attribute__((visibility("hidden")))
32 #else // defined(_LINUX)
33  #error "Unsupported Build Configuration"
34 #endif // defined(_WINDOWS)
35 
36 #endif // MPC_CONTROLLER_NODES__VISIBILITY_CONTROL_HPP_