-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #146 - First version of compiler detection macros
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 deletions.
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,21 @@ | ||
/*================================================================================================== | ||
Copyright (c) 2015 Edouard Alligand and Joel Falcou | ||
Distributed under the Boost Software License, Version 1.0. | ||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | ||
=================================================================================================**/ | ||
#pragma once | ||
|
||
// configuration macros for brigand | ||
|
||
#ifdef _MSC_VER | ||
#define BRIGAND_COMP_MSVC | ||
#endif | ||
|
||
#ifdef __GNUC__ | ||
#ifndef __clang__ | ||
#define BRIGAND_COMP_GCC | ||
#else | ||
#define BRIGAND_COMP_CLANG | ||
#endif | ||
#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,14 @@ | ||
|
||
#include <brigand/config.hpp> | ||
|
||
#ifdef BRIGAND_COMP_MSVC | ||
static_assert(_MSC_VER > 0, "wrong compiler detection macro"); | ||
#endif | ||
|
||
#ifdef BRIGAND_COMP_GCC | ||
static_assert(__GNUC__ > 0, "wrong compiler detection macro"); | ||
#endif | ||
|
||
#ifdef BRIGAND_COMP_CLANG | ||
static_assert(__clang__ > 0, "wrong compiler detection macro"); | ||
#endif |