CIOF v1.2.0-build
Char Input Output Format - A simple Input and Output utility library
Loading...
Searching...
No Matches
CIOFpredefines.hpp
Go to the documentation of this file.
1/**
2 * EXAMPLEpredefines.h - pcannonProjectStandards
3 * Predefines for C and C++ projects
4 * STD Information: 20250723 - 1.0S
5 * NOTICE:
6 * - RENAMED TO CIOFpredefines.hpp
7 * - MADE FOR The CIOF Project Utils
8 */
9
10#pragma once
11
12// Project setup
13#define CIOF_DEFAULT_CPP_STD 201703L
14
15#if defined(_MSC_VER)
16# define __CIOF_CPLUSPLUS _MSVC_LANG
17#else
18# define __CIOF_CPLUSPLUS __cplusplus
19#endif
20
21// Versioning
22#define CIOF_VERSION_MAJOR 1
23#define CIOF_VERSION_MINOR 1
24#define CIOF_VERSION_PATCH 0
25
26#define CIOF_VERSION_STD 20251013
27
28// Version states:
29// * dev
30// * alpha
31// * beta
32// * build
33#define CIOF_VERSION_STATE "build"
34
35#define CIOF_VERSION ((CIOF_VERSION_MAJOR<<16)|(CIOF_VERSION_MINOR<<8)|(CIOF_VERSION_PATCH)|(CIOF_VERSION_STATE << 24))
36
37#define CIOF_VERSION_CHECK(CIOF_VERSION_MAJOR, CIOF_VERSION_MINOR, CIOF_VERSION_PATCH, CIOF_VERSION_STATE) \
38 (((CIOF_VERSION_MAJOR)<<16)|((CIOF_VERSION_MINOR)<<8)|(CIOF_VERSION_PATCH)|((CIOF_VERSION_STATE) << 24))
39
40// Macro utils
41#define CIOF_STRINGIFY(x) #x
42#define CIOF_TOSTRING(x) CIOF_STRINGIFY(x)
43
44#ifndef CIOF_DEV
45# define CIOF_DEV true
46#endif // !defined(CIOF_DEV)
47
48// OS Checks
49#ifdef _WIN32
50# define CIOF_OS_WIN32
51# if !defined(WIN32_ANSI_SUPPORT)
52# define WIN32_ANSI_SUPPORT 1
53# endif
54# if WIN32_ANSI_SUPPORT == 1
55# warning "ANSI Support for Windows is supported from Windows 10 or newer"
56# endif
57#elif defined(__APPLE__) || defined(__MACH__) || defined(Macintosh)
58# define CIOF_OS_MACOS
59#elif defined(__linux__) || defined(__unix) || defined(__unix__)
60# define CIOF_OS_UNIX_LINUX
61#elif defined(__FreeBSD__)
62# define CIOF_OS_FREEBSD
63#else
64# warning "Current platform might not supported"
65#endif // defined(WIN32) // Platform check
66