summaryrefslogtreecommitdiff
path: root/src/SConscript.client
blob: c17009ae0b01d0ea8c6614fc973676e8e532765e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- mode: python -*-

# This SConscript used to describe the build and install rules for the Mongo C++ driver. Now it
# causes the relevant targets to emit an error message informing users that the client driver
# is now maintained in a separate repo, and provides a link to the documentation on how to
# build the driver.

import os
import textwrap

Import('env')

def failClient(target, source, env):
    failClientMessage = '''
    PLEASE NOTE: The C++ client driver repository has been moved to
    http://github.com/mongodb/mongo-cxx-driver

    As of MongoDB 2.6.0, the C++ client library has been separated from the core database
    server repository into a separate git repository. The targets specific to the C++ driver
    can no longer be built from the server codebase.

    In particular, the following targets are no longer availble in this repository:
     mongoclient
     install-mongoclient
     check-install-mongoclient
     clientTests
     smokeClient

    Additionally, the following SCons options no longer have any effect in this repository,
    though they are accepted without error for backward compatibility:
     --sharedclient
     --full
     --disable-declspec-thread

    For detailed instructions on how to build the C++ driver, please
    see http://dochub.mongodb.org/core/build-cpp-driver
    '''
    print(textwrap.dedent(failClientMessage))
    Exit(1)

failClientAction = env.Action(failClient, cmdstr=None)
failClientTargets = [
    'check-install-mongoclient',
    'clientTests',
    'install-mongoclient',
    'mongoclient',
    'smokeClient',
]

env.AlwaysBuild(
    [env.Alias(target, [], failClientAction) for target in failClientTargets]
)