Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
config.cmake.h
Go to the documentation of this file.
1// CMake uses config.cmake.h to generate config.h within the build folder.
2#pragma once
3
4#include <stddef.h>
5
6// clang-format off
7// it butchers @@ and ${} :(
8
9#define PACKAGE_NAME "@CMAKE_PROJECT_NAME@"
10#define PACKAGE_BUGREPORT "https://github.com/aurelienpierreeng/ansel/issues"
11
12// these will be defined in build/bin/version_gen.c
13extern const char darktable_package_version[];
14extern const char darktable_package_string[];
15extern const char darktable_last_commit_year[];
16
17static const char *dt_supported_extensions[] __attribute__((unused)) = {"@DT_SUPPORTED_EXTENSIONS_STRING@", NULL};
18
19#define GETTEXT_PACKAGE "ansel"
20
21// Those are used to find needed dirs runtime, so they needs to be relative.
22#define DARKTABLE_LOCALEDIR "@REL_BIN_TO_LOCALEDIR@"
23#define DARKTABLE_MODULEDIR "@REL_BIN_TO_MODULEDIR@"
24#define DARKTABLE_DATADIR "@REL_BIN_TO_DATADIR@"
25#define DARKTABLE_SHAREDIR "@REL_BIN_TO_SHAREDIR@"
26#define DARKTABLE_KERNELSDIR "@REL_BIN_TO_DATADIR@/kernels"
27
28#define SHARED_MODULE_PREFIX "@CMAKE_SHARED_MODULE_PREFIX@"
29#define SHARED_MODULE_SUFFIX "@CMAKE_SHARED_MODULE_SUFFIX@"
30
31#define WANTED_STACK_SIZE (@WANTED_STACK_SIZE@)
32#define WANTED_THREADS_STACK_SIZE (@WANTED_THREADS_STACK_SIZE@)
33
34#define ISO_CODES_LOCATION "@IsoCodes_LOCATION@"
35#define ISO_CODES_LOCALEDIR "@IsoCodes_LOCALEDIR@"
36
37// clang-format on
38
39#ifndef __GNUC_PREREQ
40// on OSX, gcc-4.6 and clang chokes if this is not here.
41#if defined __GNUC__ && defined __GNUC_MINOR__
42#define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
43#else
44#define __GNUC_PREREQ(maj, min) 0
45#endif
46#endif
47
48#if defined(_OPENMP) && __GNUC_PREREQ(4, 9)
49#define OPENMP_SIMD_
50#define SIMD() simd
51#else
52#define SIMD()
53#endif
54
55// see http://clang.llvm.org/docs/LanguageExtensions.html
56#ifndef __has_feature // Optional of course.
57#define __has_feature(x) 0 // Compatibility with non-clang compilers.
58#endif
59#ifndef __has_extension
60#define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
61#endif
62
63// see https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning
64#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
65#include <sanitizer/asan_interface.h>
66#else
67#define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
68#define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
69#endif
70
71#cmakedefine HAVE_CPUID_H 1
72#cmakedefine HAVE___GET_CPUID 1
73
74#cmakedefine HAVE_OMP_FIRSTPRIVATE_WITH_CONST 1
75
76#cmakedefine HAVE_THREAD_RWLOCK_ARCH_T_READERS 1
77
78#cmakedefine HAVE_THREAD_RWLOCK_ARCH_T_NR_READERS 1
79
80/******************************************************************************
81 * OpenCL target settings
82 *****************************************************************************/
83
84// OpenCL 3.0 is the highest version supported by Nvidia drivers as of 2025
85// and AMD caught up to 2.0.
86#define CL_TARGET_OPENCL_VERSION 200
87
88// clang-format off
89// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
90// vim: shiftwidth=2 expandtab tabstop=2 cindent
91// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
92// clang-format on
static const char *dt_supported_extensions[] __attribute__((unused))
const char darktable_package_string[]
const char darktable_package_version[]
const char darktable_last_commit_year[]