QDMI v1.3.0
Quantum Device Management Interface
Loading...
Searching...
No Matches
export.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 - 2026 QDMI Maintainers
3 * All rights reserved.
4 *
5 * Licensed under the Apache License v2.0 with LLVM Exceptions (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://llvm.org/LICENSE.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 *
17 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
18 */
19
23
24#pragma once
25
26#ifdef QDMI_STATIC_DEFINE
29#define QDMI_EXPORT
32#define QDMI_NO_EXPORT
33#else
34#ifndef QDMI_EXPORT
35#ifdef QDMI_device_EXPORTS
36/* We are building this library */
37#ifdef _WIN32
39#define QDMI_EXPORT __declspec(dllexport)
40#else
42#define QDMI_EXPORT __attribute__((visibility("default")))
43#endif
44#else
45/* We are using this library */
46#ifdef _WIN32
48#define QDMI_EXPORT __declspec(dllimport)
49#else
51#define QDMI_EXPORT __attribute__((visibility("default")))
52#endif
53#endif
54#endif
55
56#ifndef QDMI_NO_EXPORT
57#ifdef _WIN32
59#define QDMI_NO_EXPORT
60#else
62#define QDMI_NO_EXPORT __attribute__((visibility("hidden")))
63#endif
64#endif
65#endif
66
67#ifndef QDMI_DEPRECATED
68#ifdef _WIN32
70#define QDMI_DEPRECATED __declspec(deprecated)
71#else
73#define QDMI_DEPRECATED __attribute__((__deprecated__))
74#endif
75#endif
76
77#ifndef QDMI_DEPRECATED_EXPORT
79#define QDMI_DEPRECATED_EXPORT QDMI_EXPORT QDMI_DEPRECATED
80#endif
81
82#ifndef QDMI_DEPRECATED_NO_EXPORT
84#define QDMI_DEPRECATED_NO_EXPORT QDMI_NO_EXPORT QDMI_DEPRECATED
85#endif