Bugzilla – Full Text Bug Listing |
Summary: | Code in scratch directory assumes all modules are enabled | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Mitch Watrous <watrous> |
Component: | build system | Assignee: | Mitch Watrous <watrous> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | gjcarneiro, nicola, ns-bugs, tomh |
Priority: | P5 | ||
Version: | pre-release | ||
Hardware: | All | ||
OS: | All |
Description
Mitch Watrous
2011-03-31 15:28:58 EDT
I'm not sure I agree with "all modules will have to be enabled in waf when there is code in scratch"; maybe we could do the also: 1- "scratch programs are only built if all modules are enabled" 2- or just "we always build scratch programs, let the user worry about whether or not the scratch programs are buildable". You outlined only one option of 3 possible. One idea from Tom is to create (In reply to comment #1) > I'm not sure I agree with "all modules will have to be enabled in waf when > there is code in scratch"; maybe we could do the also: > > 1- "scratch programs are only built if all modules are enabled" > > 2- or just "we always build scratch programs, let the user worry about > whether or not the scratch programs are buildable". > > You outlined only one option of 3 possible. We could do 2 and use Tom's idea of having the files in ns-3-dev/scratch only depend on core. An example of such a script is hello-simulator.cc in examples/tutorial. Since every module has to depend on core, the scripts in ns-3-dev/scratch would always be able to be built. *** Bug 1091 has been marked as a duplicate of this bug. *** I am proposing to remove the existing scratch programs from Mercurial and then add the following very simple program (scratch-simulator.cc) to the scratch directory that only depends on core: #include "ns3/core-module.h" NS_LOG_COMPONENT_DEFINE ("ScratchSimulator"); using namespace ns3; int main (int argc, char *argv[]) { NS_LOG_UNCOND ("Scratch Simulator"); } (In reply to comment #4) > I am proposing to remove the existing scratch programs from Mercurial and then > add the following very simple program (scratch-simulator.cc) to the scratch > directory that only depends on core: > > #include "ns3/core-module.h" > > NS_LOG_COMPONENT_DEFINE ("ScratchSimulator"); > > using namespace ns3; > > int > main (int argc, char *argv[]) > { > NS_LOG_UNCOND ("Scratch Simulator"); > } +1 Bug closed. ns-3-dev changeset: 7b2e9458bff1 |