mirror of
https://github.com/google/benchmark.git
synced 2025-04-02 15:40:53 +08:00
move macros
This commit is contained in:
parent
3c5df425a4
commit
c3187addd2
@ -14,10 +14,6 @@
|
||||
#ifndef BENCHMARK_MACROS_H_
|
||||
#define BENCHMARK_MACROS_H_
|
||||
|
||||
#ifndef __has_feature
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
# define BENCHMARK_DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
||||
TypeName(const TypeName&); \
|
||||
@ -39,19 +35,4 @@
|
||||
# define BENCHMARK_ALWAYS_INLINE
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__CYGWIN__)
|
||||
# define OS_CYGWIN 1
|
||||
#elif defined(_WIN32)
|
||||
# define 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 OS_MACOSX 1
|
||||
#elif defined(__FreeBSD__)
|
||||
# define OS_FREEBSD 1
|
||||
#elif defined(__linux__)
|
||||
# define OS_LINUX 1
|
||||
#endif
|
||||
|
||||
#endif // BENCHMARK_MACROS_H_
|
||||
|
10
src/check.h
10
src/check.h
@ -4,17 +4,9 @@
|
||||
#include <cstdlib>
|
||||
#include <ostream>
|
||||
|
||||
#include "benchmark/macros.h"
|
||||
#include "internal_macros.h"
|
||||
#include "log.h"
|
||||
|
||||
#if __has_feature(cxx_attributes)
|
||||
# define BENCHMARK_NORETURN [[noreturn]]
|
||||
#elif defined(__GNUC__)
|
||||
# define BENCHMARK_NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
# define BENCHMARK_NORETURN
|
||||
#endif
|
||||
|
||||
namespace benchmark {
|
||||
namespace internal {
|
||||
|
||||
|
@ -39,7 +39,7 @@ extern "C" uint64_t __rdtsc();
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "benchmark/macros.h"
|
||||
#include "internal_macros.h"
|
||||
|
||||
namespace benchmark {
|
||||
// NOTE: only i386 and x86_64 have been well tested.
|
||||
|
@ -12,7 +12,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include <benchmark/macros.h>
|
||||
#include "re.h"
|
||||
|
||||
namespace benchmark {
|
||||
|
@ -3,8 +3,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "benchmark/macros.h"
|
||||
|
||||
namespace benchmark {
|
||||
namespace walltime {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user