Ansel
0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
is_supported_platform.h
Go to the documentation of this file.
1
/*
2
This file is part of darktable,
3
Copyright (C) 2016, 2018 Roman Lebedev.
4
Copyright (C) 2016 Tobias Ellinghaus.
5
Copyright (C) 2018 Robert Bridge.
6
Copyright (C) 2019 Heiko Bauke.
7
Copyright (C) 2020 Pascal Obry.
8
Copyright (C) 2021 David CARLIER.
9
Copyright (C) 2022 Martin BaĆinka.
10
11
darktable is free software: you can redistribute it and/or modify
12
it under the terms of the GNU General Public License as published by
13
the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
darktable is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU General Public License for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with darktable. If not, see <http://www.gnu.org/licenses/>.
23
*/
24
25
#pragma once
26
27
// WARNING: do not #include anything in here!
28
29
#if !defined(__BYTE_ORDER__) || __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
30
#error "Unfortunately we only work on litte-endian systems."
31
#endif
32
33
#if (defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64))
34
#define DT_SUPPORTED_X86 1
35
#else
36
#define DT_SUPPORTED_X86 0
37
#endif
38
39
#if defined(__aarch64__) && (defined(__ARM_64BIT_STATE) && defined(__ARM_ARCH) && defined(__ARM_ARCH_8A) || defined(__APPLE__))
40
#define DT_SUPPORTED_ARMv8A 1
41
#else
42
#define DT_SUPPORTED_ARMv8A 0
43
#endif
44
45
#if defined(__PPC64__)
46
#define DT_SUPPORTED_PPC64 1
47
#else
48
#define DT_SUPPORTED_PPC64 0
49
#endif
50
51
#if DT_SUPPORTED_X86 && DT_SUPPORTED_ARMv8A
52
#error "Looks like hardware platform detection macros are broken?"
53
#endif
54
55
#if !DT_SUPPORTED_X86 && !DT_SUPPORTED_ARMv8A && !DT_SUPPORTED_PPC64
56
#error "Unfortunately we only work on amd64, ARMv8-A and PPC64 (64-bit little-endian only)."
57
#endif
58
59
#undef DT_SUPPORTED_PPC64
60
#undef DT_SUPPORTED_ARMv8A
61
#undef DT_SUPPORTED_X86
62
63
#if !defined(__SSE2__) || !defined(__SSE__)
64
#pragma message "Building without SSE2 is highly experimental."
65
#pragma message "Expect a LOT of functionality to be broken. You have been warned."
66
#endif
67
68
// double check for 32-bit architecture
69
#if defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ < 8
70
#error "Unfortunately we only work on the 64-bit architectures amd64, ARMv8-A and PPC64."
71
#endif
72
73
// clang-format off
74
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
75
// vim: shiftwidth=2 expandtab tabstop=2 cindent
76
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
77
// clang-format on
78
src
is_supported_platform.h
Generated by
1.9.8