-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathccf_config.hxx
More file actions
25 lines (19 loc) · 920 Bytes
/
ccf_config.hxx
File metadata and controls
25 lines (19 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
// clang-format breaks clang @...@ macros
// clang-format off
#define CCF_PLATFORM "@CCF_PLATFORM@"
#define CCF_PLATFORM_WINDOWS @CCF_PLATFORM_WINDOWS@
#define CCF_PLATFORM_LINUX @CCF_PLATFORM_LINUX@
#define CCF_ARCH "@CANCELLAR_ARCH@"
#define CCF_ARCH_X86 @CCf_ARCH_X86@
#define CCF_ARCH_X86_32 @CCF_ARCH_X86_32@
#define CCF_ARCH_X86_64 @CCF_ARCH_X86_64@
namespace ccf::compiler_config {
constexpr decltype("@CCF_PLATFORM@") platform() noexcept { return "@CCF_PLATFORM@"; }
constexpr bool platform_windows() noexcept { return @CCF_PLATFORM_WINDOWS@; }
constexpr bool platform_linux() noexcept { return @CCF_PLATFORM_LINUX@; }
constexpr decltype("@CCF_ARCH@") arch() noexcept { return "@CCF_ARCH@"; }
constexpr bool arch_x86() noexcept { return @CCF_ARCH_X86@; }
constexpr bool arch_x86_32() noexcept { return @CCF_ARCH_X86_32@; }
constexpr bool arch_x86_64() noexcept { return @CCF_ARCH_X86_64@; }
}