src/core/wscript
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed, 25 Aug 2010 17:16:56 +0200
changeset 7041 70c8f8e0b08d
parent 6370 0a0b6bf5fdfd
child 7045 d13fa06886ce
permissions -rw-r--r--
move int64x64 to src/core/
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
     1
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
     2
import sys
4124
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
     3
import Options
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
     4
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
     5
def set_options(opt):
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
     6
    opt.add_option('--int64x64-as-double',
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
     7
                   help=('Whether to use a double floating point'
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
     8
                         ' type for int64x64 values'
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
     9
                         ' WARNING: this option only has effect '
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    10
                         'with the configure command.'),
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    11
                   action="store_true", default=False,
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    12
                   dest='int64x64_as_double')
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    13
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    14
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    15
def configure(conf):
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    16
    a = conf.check(type_name='uint128_t', define_name='HAVE_UINT128_T')
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    17
    b = conf.check(type_name='__uint128_t', define_name='HAVE___UINT128_T')
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    18
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    19
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    20
    if Options.options.int64x64_as_double:
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    21
        conf.define('INT64X64_USE_DOUBLE', 1)
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    22
        conf.env['INT64X64_USE_DOUBLE'] = 1
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    23
        highprec = 'long double'
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    24
    elif a or b:
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    25
        conf.define('INT64X64_USE_128', 1)
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    26
        conf.env['INT64X64_USE_128'] = 1
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    27
        highprec = '128-bit integer'
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    28
    else:
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    29
        conf.define('INT64X64_USE_CAIRO', 1)
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    30
        conf.env['INT64X64_USE_CAIRO'] = 1
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    31
        highprec = 'cairo 128-bit integer'
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    32
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    33
    conf.check_message_custom('high precision time', 'implementation', highprec)
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    34
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    35
    conf.check(header_name='stdint.h', define_name='HAVE_STDINT_H')
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    36
    conf.check(header_name='inttypes.h', define_name='HAVE_INTTYPES_H')
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    37
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    38
    conf.check(header_name='sys/inttypes.h', define_name='HAVE_SYS_INT_TYPES_H')
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
    39
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    40
    if conf.check(header_name='stdlib.h'):
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    41
        conf.define('HAVE_STDLIB_H', 1)
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    42
        conf.define('HAVE_GETENV', 1)
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    43
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    44
    conf.check(header_name='signal.h', define_name='HAVE_SIGNAL_H')
1018
99476ef5580a Bug #7: Better breakpoints.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1000
diff changeset
    45
4121
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    46
    # Check for POSIX threads
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    47
    test_env = conf.env.copy()
4300
b25665f81754 don't use pthread option under cygwin
Craig Dowell <craigdo@ee.washington.edu>
parents: 4150
diff changeset
    48
    if Options.platform != 'darwin' and Options.platform != 'cygwin':
4124
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    49
        test_env.append_value('LINKFLAGS', '-pthread')
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    50
        test_env.append_value('CXXFLAGS', '-pthread')
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    51
        test_env.append_value('CCFLAGS', '-pthread')
4123
383d47fa7444 Fix 'no newline at the end of file' compilation error in the pthread test
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4121
diff changeset
    52
    fragment = r"""
4121
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    53
#include <pthread.h>
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    54
int main ()
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    55
{
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    56
   pthread_mutex_t m;
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    57
   pthread_mutex_init (&m, NULL);
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    58
   return 0;
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    59
}
4123
383d47fa7444 Fix 'no newline at the end of file' compilation error in the pthread test
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4121
diff changeset
    60
"""
4121
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    61
    have_pthread = conf.check(header_name='pthread.h', define_name='HAVE_PTHREAD_H',
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    62
                              env=test_env, fragment=fragment,
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    63
                              errmsg='Could not find pthread support (build/config.log for details)',
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    64
                              mandatory=False)
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    65
    if have_pthread:
4124
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    66
        # darwin accepts -pthread but prints a warning saying it is ignored
4300
b25665f81754 don't use pthread option under cygwin
Craig Dowell <craigdo@ee.washington.edu>
parents: 4150
diff changeset
    67
        if Options.platform != 'darwin' and Options.platform != 'cygwin':
4124
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    68
            conf.env['CXXFLAGS_PTHREAD'] = '-pthread'
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    69
            conf.env['CCFLAGS_PTHREAD'] = '-pthread'
d2ec423e4576 Don't use the flag -pthread on darwin to avoid warning message
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4123
diff changeset
    70
            conf.env['LINKFLAGS_PTHREAD'] = '-pthread'
4121
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    71
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
    72
    conf.env['ENABLE_THREADING'] = have_pthread
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
    73
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
    74
    conf.report_optional_feature("Threading", "Threading Primitives",
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
    75
                                 conf.env['ENABLE_THREADING'],
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
    76
                                 "<pthread.h> include not detected")
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
    77
4531
14a102415139 Run unit tests as indenpendent WAF tasks
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4368
diff changeset
    78
    conf.write_config_header('ns3/core-config.h', top=True)
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    79
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    80
def build(bld):
1217
2f7791ae388d WAF: add new bld.create_ns3_module() and bld.create_ns3_program() methods to make declaration of modules and programs simpler, and allowing us to change how ns-3 is built in a centralized way, without needing to change every module wscript file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1018
diff changeset
    81
    core = bld.create_ns3_module('core')
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    82
    core.source = [
1498
520bc8457799 log rides along for free
Craig Dowell <craigdo@ee.washington.edu>
parents: 1414
diff changeset
    83
        'log.cc',
1018
99476ef5580a Bug #7: Better breakpoints.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1000
diff changeset
    84
        'breakpoint.cc',
2633
a0639de8cd8b split code from object.h/object.cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2609
diff changeset
    85
        'type-id.cc',
a0639de8cd8b split code from object.h/object.cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2609
diff changeset
    86
        'attribute-list.cc',
2370
5f7ad186b798 introduce ObjectBase
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2254
diff changeset
    87
        'object-base.cc',
2775
03a23eb5f1e8 bug: 147. Add RefCountBase
George F. Riley<riley@ece.gatech.edu>
parents: 2633
diff changeset
    88
        'ref-count-base.cc',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    89
        'object.cc',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    90
        'test.cc',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    91
        'random-variable.cc',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    92
        'rng-stream.cc',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    93
        'command-line.cc',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
    94
        'type-name.cc',
2438
e2ac9f9aeeb9 value.h -> attribute.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2429
diff changeset
    95
        'attribute.cc',
2452
8efda0e4423a boolean-value -> boolean
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2451
diff changeset
    96
        'boolean.cc',
2454
23ab3212cec4 int-value -> integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2452
diff changeset
    97
        'integer.cc',
2455
8253e8353689 uint-value -> uinteger
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2454
diff changeset
    98
        'uinteger.cc',
2457
87f009efcb3f enum-value -> enum
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2456
diff changeset
    99
        'enum.cc',
2456
8f40bc572412 fp-value -> double
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2455
diff changeset
   100
        'double.cc',
2502
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2482
diff changeset
   101
        'string.cc',
2926
96d1fc816681 Pointer class for primitive type pointer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2776
diff changeset
   102
        'pointer.cc',
2965
4b28e9740e3b get rid of Attribute class. Use AttributeValue subclasses directly.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2926
diff changeset
   103
        'object-vector.cc',
2395
ffd1c96afe4b a pretty simple wrapper around TypeId+Parameters: ObjectFactory
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2389
diff changeset
   104
        'object-factory.cc',
2467
da5d68ddf6c5 InitialValue -> GlobalValue
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2463
diff changeset
   105
        'global-value.cc',
2463
c77e43117673 actually allow connection and disconnection to trace sources registered in TypeIds
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2462
diff changeset
   106
        'trace-source-accessor.cc',
2474
1d1f77782138 A Config class which hooks into the Object Attribute/Tracing system.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2468
diff changeset
   107
        'config.cc',
3763
e46e361a4262 give attribute power to Callback.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3648
diff changeset
   108
        'callback.cc',
4147
5d8530130930 rename object-names.{cc,h} to names.{cc,h} per convention
Craig Dowell <craigdo@ee.washington.edu>
parents: 4139
diff changeset
   109
        'names.cc',
4718
7138f037be1f introduce Vector2D and Vector3D
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4531
diff changeset
   110
        'vector.cc',
5255
2f3abe6fa8a3 Remove and replace Callback unit test, add examples to test.py
Craig Dowell <craigdo@ee.washington.edu>
parents: 5248
diff changeset
   111
        'attribute-test-suite.cc',
2f3abe6fa8a3 Remove and replace Callback unit test, add examples to test.py
Craig Dowell <craigdo@ee.washington.edu>
parents: 5248
diff changeset
   112
        'callback-test-suite.cc',
4772
7b6ae6bf0055 add test and validation framework
Craig Dowell <craigdo@ee.washington.edu>
parents: 4718
diff changeset
   113
        'names-test-suite.cc',
5248
6b93abd21871 Remove and replace type traits unit test (bug 675)
Craig Dowell <craigdo@ee.washington.edu>
parents: 5240
diff changeset
   114
        'type-traits-test-suite.cc',
5298
00703d57e767 Remove and replace traced-callback unit tests (bug 675)
Craig Dowell <craigdo@ee.washington.edu>
parents: 5255
diff changeset
   115
        'traced-callback-test-suite.cc',
5324
0ba73cdd2a43 Refalgamize test framework to allow multiple test failures
Craig Dowell <craigdo@ee.washington.edu>
parents: 5298
diff changeset
   116
        'ptr-test-suite.cc',
6370
0a0b6bf5fdfd bug 933: Flushing ostream and files on abnormal program exit
Quincy Tse <quincy.tse@gmail.com>
parents: 5840
diff changeset
   117
        'fatal-impl.cc',
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   118
        'int64x64.cc',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   119
        ]
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   120
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
   121
    headers = bld.new_task_gen('ns3header')
2609
931d59bb1303 Add a 'module' attribute to the ns3header object specifying which module each set of headers belongs to.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 2577
diff changeset
   122
    headers.module = 'core'
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   123
    headers.source = [
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   124
        'system-wall-clock-ms.h',
760
975a88259e2e Re-sync WAF build with the latest SConstruct changes.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 688
diff changeset
   125
        'empty.h',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   126
        'callback.h',
2370
5f7ad186b798 introduce ObjectBase
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2254
diff changeset
   127
        'object-base.h',
2776
1b2520396ba9 export header.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2775
diff changeset
   128
        'ref-count-base.h',
5505
c0ac392289c3 replace RefCountBase with SimpleRefCount<> to avoid duplicate refcounting implementations.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 5486
diff changeset
   129
        'simple-ref-count.h',
2633
a0639de8cd8b split code from object.h/object.cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2609
diff changeset
   130
        'type-id.h',
a0639de8cd8b split code from object.h/object.cc
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2609
diff changeset
   131
        'attribute-list.h',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   132
        'ptr.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   133
        'object.h',
1498
520bc8457799 log rides along for free
Craig Dowell <craigdo@ee.washington.edu>
parents: 1414
diff changeset
   134
        'log.h',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   135
        'assert.h',
1018
99476ef5580a Bug #7: Better breakpoints.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1000
diff changeset
   136
        'breakpoint.h',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   137
        'fatal-error.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   138
        'test.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   139
        'random-variable.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   140
        'rng-stream.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   141
        'command-line.h',
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   142
        'type-name.h',
960
f75042c35fc6 RandomVariableDefaultValue
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 953
diff changeset
   143
        'type-traits.h',
1680
151684970a80 implement the helper IntToType template
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1678
diff changeset
   144
        'int-to-type.h',
2438
e2ac9f9aeeb9 value.h -> attribute.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2429
diff changeset
   145
        'attribute.h',
2449
30127bc12056 param-spec-helper.h -> attribute-accessor-helper.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2448
diff changeset
   146
        'attribute-accessor-helper.h',
2452
8efda0e4423a boolean-value -> boolean
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2451
diff changeset
   147
        'boolean.h',
2454
23ab3212cec4 int-value -> integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2452
diff changeset
   148
        'integer.h',
2455
8253e8353689 uint-value -> uinteger
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2454
diff changeset
   149
        'uinteger.h',
2456
8f40bc572412 fp-value -> double
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2455
diff changeset
   150
        'double.h',
2457
87f009efcb3f enum-value -> enum
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2456
diff changeset
   151
        'enum.h',
2502
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2482
diff changeset
   152
        'string.h',
2926
96d1fc816681 Pointer class for primitive type pointer.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2776
diff changeset
   153
        'pointer.h',
2395
ffd1c96afe4b a pretty simple wrapper around TypeId+Parameters: ObjectFactory
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2389
diff changeset
   154
        'object-factory.h',
2451
8979f07befd5 value-helper.h -> attribute-helper.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2450
diff changeset
   155
        'attribute-helper.h',
2467
da5d68ddf6c5 InitialValue -> GlobalValue
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2463
diff changeset
   156
        'global-value.h',
2482
adbc284a5849 EventTraceSource -> TracedCallback, ValueTraceSource -> TracedValue.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2477
diff changeset
   157
        'traced-callback.h',
adbc284a5849 EventTraceSource -> TracedCallback, ValueTraceSource -> TracedValue.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2477
diff changeset
   158
        'traced-value.h',
2463
c77e43117673 actually allow connection and disconnection to trace sources registered in TypeIds
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2462
diff changeset
   159
        'trace-source-accessor.h',
2474
1d1f77782138 A Config class which hooks into the Object Attribute/Tracing system.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2468
diff changeset
   160
        'config.h',
2477
64ab84674302 export public header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2474
diff changeset
   161
        'object-vector.h',
3781
0eea20a7b592 bug 339: unconditional assert API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3763
diff changeset
   162
        'deprecated.h',
0eea20a7b592 bug 339: unconditional assert API.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3763
diff changeset
   163
        'abort.h',
4147
5d8530130930 rename object-names.{cc,h} to names.{cc,h} per convention
Craig Dowell <craigdo@ee.washington.edu>
parents: 4139
diff changeset
   164
        'names.h',
4718
7138f037be1f introduce Vector2D and Vector3D
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4531
diff changeset
   165
        'vector.h',
5840
c2b3762932e8 get rid of last duplicated reference counting implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 5505
diff changeset
   166
        'default-deleter.h',
6370
0a0b6bf5fdfd bug 933: Flushing ostream and files on abnormal program exit
Quincy Tse <quincy.tse@gmail.com>
parents: 5840
diff changeset
   167
        'fatal-impl.h',
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   168
        'int64x64.h',
537
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   169
        ]
e8a4183dfe00 Add support for building with WAF
Gustavo J. A. M. Carneiro <gjcarneiro@gmail.com>
parents:
diff changeset
   170
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   171
    if sys.platform == 'win32':
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   172
        core.source.extend([
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   173
            'win32-system-wall-clock-ms.cc',
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   174
            ])
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   175
    else:
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   176
        core.source.extend([
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   177
            'unix-system-wall-clock-ms.cc',
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   178
            ])
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   179
4064
10222f483860 Upgrade to new WAF, work in progress
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3781
diff changeset
   180
    if bld.env['ENABLE_THREADING']:
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   181
        core.source.extend([
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   182
            'unix-system-thread.cc',
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   183
            'unix-system-mutex.cc',
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   184
            'unix-system-condition.cc',
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   185
            ])
4121
4bbe798b0dab Detect pthread support by compiling a test program with the -pthread switch, not just check for the header file.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4120
diff changeset
   186
        core.uselib = 'PTHREAD'
3648
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   187
        headers.source.extend([
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   188
                'system-mutex.h',
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   189
                'system-thread.h',
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   190
                'system-condition.h',
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   191
                ])
f912b24ddf2d Detect the pthread.h header file and automatically disable components that cannot build without it.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 3556
diff changeset
   192
7041
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   193
    env = bld.env_of_name('default')
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   194
    if env['INT64X64_USE_DOUBLE']:
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   195
        headers.source.extend(['int64x64-double.h'])
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   196
    elif env['INT64X64_USE_128']:
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   197
        headers.source.extend(['int64x64-128.h'])
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   198
        core.source.extend(['int64x64-128.cc'])
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   199
    elif env['INT64X64_USE_CAIRO']:
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   200
        core.source.extend([
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   201
            'int64x64-cairo.cc',
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   202
            ])
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   203
        headers.source.extend([
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   204
            'int64x64-cairo.h',
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   205
            'cairo-wideint-private.h',
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   206
            ])
70c8f8e0b08d move int64x64 to src/core/
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 6370
diff changeset
   207
4773
904c1803d5dc test framework should probably work on all supported machines
Craig Dowell <craigdo@ee.washington.edu>
parents: 4772
diff changeset
   208
    if bld.env['ENABLE_GSL']:
5238
a5b185f132fe bug 687: Build failed with GSL in non-default location
Aleksey Kovalenko <kovalenko@iitp.ru>
parents: 4773
diff changeset
   209
        core.uselib = 'GSL GSLCBLAS M'
4773
904c1803d5dc test framework should probably work on all supported machines
Craig Dowell <craigdo@ee.washington.edu>
parents: 4772
diff changeset
   210
        core.source.extend(['rng-test-suite.cc'])