Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
config.cmake.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2010 Henrik Andersson.
4 Copyright (C) 2010-2011, 2013-2014, 2016-2018, 2020 Tobias Ellinghaus.
5 Copyright (C) 2011 Karl Mikaelsson.
6 Copyright (C) 2012 johannes hanika.
7 Copyright (C) 2012 Jérémy Rosen.
8 Copyright (C) 2012 Richard Wonka.
9 Copyright (C) 2015-2016 Bernd Steinhauser.
10 Copyright (C) 2016 Roman Lebedev.
11 Copyright (C) 2019 Andreas Schneider.
12 Copyright (C) 2019 Marcus Rückert.
13 Copyright (C) 2020 David-Tillmann Schaefer.
14 Copyright (C) 2022-2023, 2025-2026 Aurélien PIERRE.
15 Copyright (C) 2022 Martin Bařinka.
16 Copyright (C) 2023 Alynx Zhou.
17 Copyright (C) 2023 Luca Zulberti.
18
19 darktable is free software: you can redistribute it and/or modify
20 it under the terms of the GNU General Public License as published by
21 the Free Software Foundation, either version 3 of the License, or
22 (at your option) any later version.
23
24 darktable is distributed in the hope that it will be useful,
25 but WITHOUT ANY WARRANTY; without even the implied warranty of
26 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 GNU General Public License for more details.
28
29 You should have received a copy of the GNU General Public License
30 along with darktable. If not, see <http://www.gnu.org/licenses/>.
31*/
32// CMake uses config.cmake.h to generate config.h within the build folder.
33#ifndef DT_CONFIG_CMAKE_H
34#define DT_CONFIG_CMAKE_H
35
36#include <stddef.h>
37
38// clang-format off
39// it butchers @@ and ${} :(
40
41#define PACKAGE_NAME "@CMAKE_PROJECT_NAME@"
42#define PACKAGE_BUGREPORT "https://github.com/aurelienpierreeng/ansel/issues"
43
44// these will be defined in build/bin/version_gen.c
45extern const char darktable_package_version[];
46extern const char darktable_package_string[];
47extern const char darktable_last_commit_year[];
48// Full 40-char commit SHA, consistent across shallow and full clones. Used as the
49// Sentry/PostHog release id (the version string's abbreviated hash/commit count is
50// not reliable across clone types). See tools/create_version_c.sh.
51extern const char darktable_commit_hash[];
52
53#define DT_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
54// Distribution channel: "nightly" for official CI-built binaries, "self-build" for
55// anything compiled locally (possibly a development build). Used to separate
56// official from local builds in crash reports and usage analytics.
57#define DT_BUILD_CHANNEL "@BUILD_CHANNEL@"
58#define DT_BUILD_CPU_MODE "@DT_BUILD_CPU_MODE@"
59#define DT_BUILD_C_COMPILER "@CMAKE_C_COMPILER_ID@ @CMAKE_C_COMPILER_VERSION@"
60#define DT_BUILD_CXX_COMPILER "@CMAKE_CXX_COMPILER_ID@ @CMAKE_CXX_COMPILER_VERSION@"
61#define DT_BUILD_C_FLAGS "@CMAKE_C_FLAGS@"
62#define DT_BUILD_CXX_FLAGS "@CMAKE_CXX_FLAGS@"
63
64static const char *dt_supported_extensions[] __attribute__((unused)) = {"@DT_SUPPORTED_EXTENSIONS_STRING@", NULL};
65
66#define GETTEXT_PACKAGE "ansel"
67
68// Those are used to find needed dirs runtime, so they needs to be relative.
69#define DARKTABLE_LOCALEDIR "@REL_BIN_TO_LOCALEDIR@"
70#define DARKTABLE_MODULEDIR "@REL_BIN_TO_MODULEDIR@"
71#define DARKTABLE_DATADIR "@REL_BIN_TO_DATADIR@"
72#define DARKTABLE_SHAREDIR "@REL_BIN_TO_SHAREDIR@"
73#define DARKTABLE_KERNELSDIR "@REL_BIN_TO_DATADIR@/kernels"
74
75#define SHARED_MODULE_PREFIX "@CMAKE_SHARED_MODULE_PREFIX@"
76#define SHARED_MODULE_SUFFIX "@CMAKE_SHARED_MODULE_SUFFIX@"
77
78#define WANTED_STACK_SIZE (@WANTED_STACK_SIZE@)
79#define WANTED_THREADS_STACK_SIZE (@WANTED_THREADS_STACK_SIZE@)
80
81#define ISO_CODES_LOCATION "@IsoCodes_LOCATION@"
82#define ISO_CODES_LOCALEDIR "@IsoCodes_LOCALEDIR@"
83
84// clang-format on
85
86#ifndef __GNUC_PREREQ
87// on OSX, gcc-4.6 and clang chokes if this is not here.
88#if defined __GNUC__ && defined __GNUC_MINOR__
89#define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
90#else
91#define __GNUC_PREREQ(maj, min) 0
92#endif
93#endif
94
95// see http://clang.llvm.org/docs/LanguageExtensions.html
96#ifndef __has_feature // Optional of course.
97#define __has_feature(x) 0 // Compatibility with non-clang compilers.
98#endif
99#ifndef __has_extension
100#define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
101#endif
102
103// see https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning
104#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
105#include <sanitizer/asan_interface.h>
106#else
107#define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
108#define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
109#endif
110
111#cmakedefine HAVE_CPUID_H 1
112#cmakedefine HAVE___GET_CPUID 1
113
114#cmakedefine HAVE_THREAD_RWLOCK_ARCH_T_READERS 1
115
116#cmakedefine HAVE_THREAD_RWLOCK_ARCH_T_NR_READERS 1
117
118/******************************************************************************
119 * OpenCL target settings
120 *****************************************************************************/
121
122// OpenCL 3.0 is the highest version supported by Nvidia drivers as of 2025
123// and AMD caught up to 2.0.
124#define CL_TARGET_OPENCL_VERSION 200
125
126#endif // DT_CONFIG_CMAKE_H
127
128// clang-format off
129// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
130// vim: shiftwidth=2 expandtab tabstop=2 cindent
131// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
132// clang-format on
const char darktable_commit_hash[]
const char darktable_package_string[]
const char darktable_package_version[]
const char darktable_last_commit_year[]
float dt_aligned_pixel_simd_t __attribute__((vector_size(16), aligned(16)))
Apply one channel's tone curve to each of the three colour channels, or pass the channel through unto...
Definition simd.h:55