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