diff options
author | 2016-01-29 11:47:40 +0100 | |
---|---|---|
committer | 2016-01-29 11:47:40 +0100 | |
commit | 042050ef67a0d320469a6f8ca74bd8684ec4c409 (patch) | |
tree | 842576848565813c5f33e21fc06ad058f43a8963 /3rdparty/benchmark/src/internal_macros.h | |
parent | 1319453a84718ec50aafdb030eca3bac201995e3 (diff) |
Added Google Benchmark library (nw)
Included sample benchmark for eminline for native and noasm
Made GoogleTest compile only if tests are compiled
Diffstat (limited to '3rdparty/benchmark/src/internal_macros.h')
-rw-r--r-- | 3rdparty/benchmark/src/internal_macros.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/3rdparty/benchmark/src/internal_macros.h b/3rdparty/benchmark/src/internal_macros.h new file mode 100644 index 00000000000..1080ac9435a --- /dev/null +++ b/3rdparty/benchmark/src/internal_macros.h @@ -0,0 +1,40 @@ +#ifndef BENCHMARK_INTERNAL_MACROS_H_ +#define BENCHMARK_INTERNAL_MACROS_H_ + +#include "benchmark/macros.h" + +#ifndef __has_feature +# define __has_feature(x) 0 +#endif + +#if __has_feature(cxx_attributes) +# define BENCHMARK_NORETURN [[noreturn]] +#elif defined(__GNUC__) +# define BENCHMARK_NORETURN __attribute__((noreturn)) +#else +# define BENCHMARK_NORETURN +#endif + +#if defined(__CYGWIN__) +# define BENCHMARK_OS_CYGWIN 1 +#elif defined(_WIN32) +# define BENCHMARK_OS_WINDOWS 1 +#elif defined(__APPLE__) +// TODO(ericwf) This doesn't actually check that it is a Mac OSX system. Just +// that it is an apple system. +# define BENCHMARK_OS_MACOSX 1 +#elif defined(__FreeBSD__) +# define BENCHMARK_OS_FREEBSD 1 +#elif defined(__linux__) +# define BENCHMARK_OS_LINUX 1 +#endif + +#if defined(__clang__) +# define COMPILER_CLANG +#elif defined(_MSC_VER) +# define COMPILER_MSVC +#elif defined(__GNUC__) +# define COMPILER_GCC +#endif + +#endif // BENCHMARK_INTERNAL_MACROS_H_ |