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 if (false) \
38  { \
39  code; \
40  } while (false)
41 
47 #define NS_BUILD_PROFILE_OP(code) \
48  do \
49  { \
50  code; \
51  } while (false)
52 
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 
88 
89 
90 #endif /* NS3_BUILD_PROFILE_H */