A Discrete-Event Network Simulator
API
build-profile.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015 LLNL
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Peter D. Barnes, Jr. <pdbarnes@llnl.gov>
19  */
20 
21 #ifndef NS3_BUILD_PROFILE_H
22 #define NS3_BUILD_PROFILE_H
23 
36 #define NS_BUILD_PROFILE_NOOP(code) \
37  do \
38  if (false) \
39  { \
40  code ; \
41  } \
42  while (false)
43 
49 #define NS_BUILD_PROFILE_OP(code) \
50  do \
51  { \
52  code ; \
53  } \
54  while (false)
55 
56 
57 #ifdef NS3_BUILD_PROFILE_DEBUG
58 
63 #define NS_BUILD_DEBUG(code) NS_BUILD_PROFILE_OP (code)
64 #else
65 #define NS_BUILD_DEBUG(code) NS_BUILD_PROFILE_NOOP (code)
66 #endif
67 
68 #ifdef NS3_BUILD_PROFILE_RELEASE
69 
74 #define NS_BUILD_RELEASE(code) NS_BUILD_PROFILE_OP (code)
75 #else
76 #define NS_BUILD_RELEASE(code) NS_BUILD_PROFILE_NOOP (code)
77 #endif
78 
79 #ifdef NS3_BUILD_PROFILE_OPTIMIZED
80 
85 #define NS_BUILD_OPTIMIZED(code) NS_BUILD_PROFILE_OP (code)
86 #else
87 #define NS_BUILD_OPTIMIZED(code) NS_BUILD_PROFILE_NOOP (code)
88 #endif
89 
90 
91 
92 
93 #endif /* NS3_BUILD_PROFILE_H */