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 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#pragma once
34
35#include <stddef.h>
36
37// clang-format off
38// it butchers @@ and ${} :(
39
40#define PACKAGE_NAME "@CMAKE_PROJECT_NAME@"
41#define PACKAGE_BUGREPORT "https://github.com/aurelienpierreeng/ansel/issues"
42
43// these will be defined in build/bin/version_gen.c
44extern const char darktable_package_version[];
45extern const char darktable_package_string[];
46extern const char darktable_last_commit_year[];
47
48static const char *dt_supported_extensions[] __attribute__((unused)) = {"@DT_SUPPORTED_EXTENSIONS_STRING@", NULL};
49
50#define GETTEXT_PACKAGE "ansel"
51
52// Those are used to find needed dirs runtime, so they needs to be relative.
53#define DARKTABLE_LOCALEDIR "@REL_BIN_TO_LOCALEDIR@"
54#define DARKTABLE_MODULEDIR "@REL_BIN_TO_MODULEDIR@"
55#define DARKTABLE_DATADIR "@REL_BIN_TO_DATADIR@"
56#define DARKTABLE_SHAREDIR "@REL_BIN_TO_SHAREDIR@"
57#define DARKTABLE_KERNELSDIR "@REL_BIN_TO_DATADIR@/kernels"
58
59#define SHARED_MODULE_PREFIX "@CMAKE_SHARED_MODULE_PREFIX@"
60#define SHARED_MODULE_SUFFIX "@CMAKE_SHARED_MODULE_SUFFIX@"
61
62#define WANTED_STACK_SIZE (@WANTED_STACK_SIZE@)
63#define WANTED_THREADS_STACK_SIZE (@WANTED_THREADS_STACK_SIZE@)
64
65#define ISO_CODES_LOCATION "@IsoCodes_LOCATION@"
66#define ISO_CODES_LOCALEDIR "@IsoCodes_LOCALEDIR@"
67
68// clang-format on
69
70#ifndef __GNUC_PREREQ
71// on OSX, gcc-4.6 and clang chokes if this is not here.
72#if defined __GNUC__ && defined __GNUC_MINOR__
73#define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
74#else
75#define __GNUC_PREREQ(maj, min) 0
76#endif
77#endif
78
79#if defined(_OPENMP) && __GNUC_PREREQ(4, 9)
80#define OPENMP_SIMD_
81#define SIMD() simd
82#else
83#define SIMD()
84#endif
85
86// see http://clang.llvm.org/docs/LanguageExtensions.html
87#ifndef __has_feature // Optional of course.
88#define __has_feature(x) 0 // Compatibility with non-clang compilers.
89#endif
90#ifndef __has_extension
91#define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
92#endif
93
94// see https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning
95#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
96#include <sanitizer/asan_interface.h>
97#else
98#define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
99#define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
100#endif
101
102#cmakedefine HAVE_CPUID_H 1
103#cmakedefine HAVE___GET_CPUID 1
104
105#cmakedefine HAVE_OMP_FIRSTPRIVATE_WITH_CONST 1
106
107#cmakedefine HAVE_THREAD_RWLOCK_ARCH_T_READERS 1
108
109#cmakedefine HAVE_THREAD_RWLOCK_ARCH_T_NR_READERS 1
110
111/******************************************************************************
112 * OpenCL target settings
113 *****************************************************************************/
114
115// OpenCL 3.0 is the highest version supported by Nvidia drivers as of 2025
116// and AMD caught up to 2.0.
117#define CL_TARGET_OPENCL_VERSION 200
118
119// clang-format off
120// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
121// vim: shiftwidth=2 expandtab tabstop=2 cindent
122// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
123// clang-format on
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)))
Multi-tap smudge source sample with directional jitter.
Definition darktable.h:448