]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/python/config/toolchains/msvc.py
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / python / config / toolchains / msvc.py
1 #
2 # Copyright (c) 2016 Stefan Seefeld
3 # All rights reserved.
4 #
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or copy at
7 # http://www.boost.org/LICENSE_1_0.txt)
8
9 from . import append_feature_flag
10
11 class features:
12
13 @classmethod
14 def init_once(cls, env):
15 env.AppendUnique(CCFLAGS = ['-TP', '/Z7', '/W3' ,'/GR', '/MDd', '/Zc:forScope', '/Zc:wchar_t', '/wd4675', '/EHs'])
16 env.AppendUnique(LINKFLAGS = ['/subsystem:console'])
17
18 @staticmethod
19 def architecture(env, arch):
20 if arch:
21 flag = {'x86' : '/MACHINE:X86',
22 'x86_64' : '/MACHINE:X64',}.get(arch)
23 if flag:
24 append_feature_flag(env, LINKFLAGS = flag)
25
26 @staticmethod
27 def optimize(env, optimize):
28 #if not optimize or optimize == "no":
29 # append_feature_flag(env, CCFLAGS = "-O0 -fno-inline")
30 #elif optimize == "speed":
31 # append_feature_flag(env, CCFLAGS = "-O3 -finline-functions -Wno-inline")
32 #elif optimize == "space":
33 # append_feature_flag(env, CCFLAGS = "-Os")
34 #else:
35 append_feature_flag(env, CCFLAGS = "")
36
37 @staticmethod
38 def profile(env, profile):
39 #if profile:
40 # append_feature_flag(env, CCFLAGS = "-pg", LINKFLAGS = "-pg")
41 #else:
42 append_feature_flag(env, CCFLAGS = "", LINKFLAGS = "")
43
44 @staticmethod
45 def threading(env, threading):
46 #if threading == "multi":
47 # append_feature_flag(env, CCFLAGS = "/MT")
48 #else:
49 # append_feature_flag(env, CCFLAGS = "", LINKFLAGS = "")
50 pass
51
52 @staticmethod
53 def debug(env, debug):
54 #if debug:
55 # append_feature_flag(env, CCFLAGS = "-g", CPPDEFINES = [])
56 #else:
57 append_feature_flag(env, CCFLAGS = "", CPPDEFINES = "NDEBUG")