All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
buildMode.h
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_BASE_ARCH_BUILD_MODE_H
8#define PXR_BASE_ARCH_BUILD_MODE_H
9
10#include "pxr/pxr.h"
11#include "pxr/base/arch/defines.h"
12
13PXR_NAMESPACE_OPEN_SCOPE
14
15struct ArchBuildMode {
16// Check if the build system has specified a build mode, falling
17// back to commonly-used macros if it has not. (Typically, _DEBUG
18// is defined by Visual Studio and DEBUG by Xcode for debug-mode builds)
19#if defined(BUILD_OPTLEVEL_DEV) || defined(_DEBUG) || defined(DEBUG)
20 enum { DEV_BUILD = 1 };
21#else
22 enum { DEV_BUILD = 0 };
23#endif
24};
25
26#define ARCH_DEV_BUILD ArchBuildMode::DEV_BUILD
27
28PXR_NAMESPACE_CLOSE_SCOPE
29
30#endif // PXR_BASE_ARCH_BUILD_MODE_H