-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from arcsine-project/revisit-config
Added configurations for different modules
- Loading branch information
Showing
7 changed files
with
122 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#if defined(__clang__) | ||
# define FLUX_CLANG_FULL_VERSION \ | ||
(__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) | ||
// For compatibility with existing code that compiles with MSVC, | ||
// clang defines the _MSC_VER and _MSC_FULL_VER macros. | ||
# if defined(_MSC_VER) | ||
# define FLUX_MSC_FULL_VERSION (_MSC_FULL_VER) | ||
# endif | ||
#else | ||
# error "Compiler not supported." | ||
#endif |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#ifdef FLUX_TARGET_OPENGL | ||
# define FLUX_OPENGL_FULL_VERSION \ | ||
FLUX_JOIN(FLUX_OPENGL_VERSION_MAJOR, FLUX_JOIN(FLUX_OPENGL_VERSION_MINOR, 0)) | ||
# define FLUX_GLSL_VERSION "#version " FLUX_TO_STRING(FLUX_OPENGL_FULL_VERSION) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#pragma once | ||
|
||
// Whether or not the allocation size will be checked. | ||
#define FLUX_MEMORY_CHECK_ALLOCATION_SIZE (1) | ||
|
||
// Whether or not allocated memory will be filled with special values. | ||
#define FLUX_MEMORY_DEBUG_FILL (1) | ||
|
||
// The size of the fence memory, it has no effect if FLUX_MEMORY_DEBUG_FILL is disabled. | ||
#define FLUX_MEMORY_DEBUG_FENCE (1) | ||
|
||
// Whether or not leak checking is enabled. | ||
#define FLUX_MEMORY_DEBUG_LEAK (1) | ||
|
||
// Whether or not the deallocation functions will check for pointers that were never allocated by an | ||
// allocator. | ||
#define FLUX_MEMORY_DEBUG_POINTER (1) | ||
|
||
// Whether or not the deallocation functions will check for double free errors. | ||
#define FLUX_MEMORY_DEBUG_DOUBLE_FREE (1) | ||
|
||
// Whether or not the `temporary_allocator` will use a `temporary_stack` for its allocation. This | ||
// option controls how and if a global, per-thread instance of it is managed. If 2 it is | ||
// automatically managed and created on-demand, if 1 you need explicit lifetime control through the | ||
// `temporary_stack_initializer` class and if 0 there is no stack created automatically. Mode 2 has | ||
// a slight runtime overhead. | ||
#define FLUX_MEMORY_TEMPORARY_STACK_MODE (2) | ||
|
||
#ifdef NDEBUG | ||
# undef FLUX_MEMORY_CHECK_ALLOCATION_SIZE | ||
# define FLUX_MEMORY_CHECK_ALLOCATION_SIZE (0) | ||
|
||
# undef FLUX_MEMORY_DEBUG_FILL | ||
# define FLUX_MEMORY_DEBUG_FILL (0) | ||
|
||
# undef FLUX_MEMORY_DEBUG_FENCE | ||
# define FLUX_MEMORY_DEBUG_FENCE (0) | ||
|
||
# undef FLUX_MEMORY_DEBUG_LEAK | ||
# define FLUX_MEMORY_DEBUG_LEAK (0) | ||
|
||
# undef FLUX_MEMORY_DEBUG_POINTER | ||
# define FLUX_MEMORY_DEBUG_POINTER (0) | ||
|
||
# undef FLUX_MEMORY_DEBUG_DOUBLE_FREE | ||
# define FLUX_MEMORY_DEBUG_DOUBLE_FREE (0) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
#define FLUX_TARGET_APPLE (0) | ||
#define FLUX_TARGET_MACOSX (0) | ||
#define FLUX_TARGET_WINDOWS (0) | ||
#define FLUX_TARGET_LINUX (0) | ||
|
||
// clang-format off | ||
#if defined(_WIN64) && !defined(__WINE__) | ||
# undef FLUX_TARGET_WINDOWS | ||
# define FLUX_TARGET_WINDOWS (1) | ||
#elif defined(__APPLE__) | ||
# undef FLUX_TARGET_APPLE | ||
# define FLUX_TARGET_APPLE (1) | ||
# include <TargetConditionals.h> | ||
# if defined(TARGET_OS_MAC) | ||
# undef FLUX_TARGET_MACOSX | ||
# define FLUX_TARGET_MACOSX (1) | ||
# endif | ||
#elif defined(__linux__) | ||
# undef FLUX_TARGET_LINUX | ||
# define FLUX_TARGET_LINUX (1) | ||
#endif | ||
// clang-format on | ||
|
||
#define FLUX_TARGET(X) FLUX_JOIN(FLUX_TARGET_, X) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#pragma once | ||
|
||
// clang-format off | ||
#if defined(FLUX_CLANG) | ||
# define _FLUX_PRAGMA(diagnostic) _Pragma(FLUX_TO_STRING(diagnostic)) | ||
# define FLUX_DISABLE_WARNING_PUSH _FLUX_PRAGMA(clang diagnostic push) | ||
# define FLUX_DISABLE_WARNING_POP _FLUX_PRAGMA(clang diagnostic pop) | ||
# define FLUX_DISABLE_WARNING(warning) _FLUX_PRAGMA(clang diagnostic ignored #warning) | ||
# define FLUX_DISABLE_WARNING_BLOCK(warning, ...) \ | ||
FLUX_DISABLE_WARNING_PUSH \ | ||
FLUX_DISABLE_WARNING(warning) \ | ||
__VA_ARGS__ \ | ||
FLUX_DISABLE_WARNING_POP | ||
// Warnings you want to deactivate: | ||
# define FLUX_DISABLE_WARNING_DEPRECATED_DECLARATIONS FLUX_DISABLE_WARNING(-Wdeprecated-declarations) | ||
#else | ||
# define FLUX_DISABLE_WARNING_PUSH /* nothing */ | ||
# define FLUX_DISABLE_WARNING_POP /* nothing */ | ||
# define FLUX_DISABLE_WARNING(warning) /* nothing */ | ||
# define FLUX_DISABLE_WARNING_BLOCK(warning, ...) /* nothing */ | ||
# define FLUX_DISABLE_WARNING_DEPRECATED_DECLARATIONS /* nothing */ | ||
#endif | ||
// clang-format on |