MCPcopy Create free account
hub / github.com/boostorg/build / register_toolset_really

Function register_toolset_really

v2/tools/msvc.py:931–1069  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

929# multiple times.
930
931def register_toolset_really():
932 feature.extend('toolset', ['msvc'])
933
934 # Intel and msvc supposedly have link-compatible objects.
935 feature.subfeature( 'toolset', 'msvc', 'vendor', 'intel', ['propagated', 'optional'])
936
937 # Inherit MIDL flags.
938 toolset.inherit_flags('msvc', 'midl')
939
940 # Inherit MC flags.
941 toolset.inherit_flags('msvc','mc')
942
943 # Dynamic runtime comes only in MT flavour.
944 toolset.add_requirements(['<toolset>msvc,<runtime-link>shared:<threading>multi'])
945
946 # Declare msvc toolset specific features.
947 feature.feature('debug-store', ['object', 'database'], ['propagated'])
948 feature.feature('pch-source', [], ['dependency', 'free'])
949
950 # Declare generators.
951
952 # TODO: Is it possible to combine these? Make the generators
953 # non-composing so that they do not convert each source into a separate
954 # .rsp file.
955 generators.register(MsvcLinkingGenerator('msvc.link', True, ['OBJ', 'SEARCHED_LIB', 'STATIC_LIB', 'IMPORT_LIB'], ['EXE'], ['<toolset>msvc']))
956 generators.register(MsvcLinkingGenerator('msvc.link.dll', True, ['OBJ', 'SEARCHED_LIB', 'STATIC_LIB', 'IMPORT_LIB'], ['SHARED_LIB','IMPORT_LIB'], ['<toolset>msvc']))
957
958 builtin.register_archiver('msvc.archive', ['OBJ'], ['STATIC_LIB'], ['<toolset>msvc'])
959 builtin.register_c_compiler('msvc.compile.c++', ['CPP'], ['OBJ'], ['<toolset>msvc'])
960 builtin.register_c_compiler('msvc.compile.c', ['C'], ['OBJ'], ['<toolset>msvc'])
961 builtin.register_c_compiler('msvc.compile.c++.preprocess', ['CPP'], ['PREPROCESSED_CPP'], ['<toolset>msvc'])
962 builtin.register_c_compiler('msvc.compile.c.preprocess', ['C'], ['PREPROCESSED_C'], ['<toolset>msvc'])
963
964 # Using 'register-c-compiler' adds the build directory to INCLUDES.
965 builtin.register_c_compiler('msvc.compile.rc', ['RC'], ['OBJ(%_res)'], ['<toolset>msvc'])
966 generators.override('msvc.compile.rc', 'rc.compile.resource')
967 generators.register_standard('msvc.compile.asm', ['ASM'], ['OBJ'], ['<toolset>msvc'])
968
969 builtin.register_c_compiler('msvc.compile.idl', ['IDL'], ['MSTYPELIB', 'H', 'C(%_i)', 'C(%_proxy)', 'C(%_dlldata)'], ['<toolset>msvc'])
970 generators.override('msvc.compile.idl', 'midl.compile.idl')
971
972 generators.register_standard('msvc.compile.mc', ['MC'], ['H','RC'], ['<toolset>msvc'])
973 generators.override('msvc.compile.mc', 'mc.compile')
974
975 # Note: the 'H' source type will catch both '.h' and '.hpp' headers as
976 # the latter have their HPP type derived from H. The type of compilation
977 # is determined entirely by the destination type.
978 generators.register(MsvcPchGenerator('msvc.compile.c.pch', False, ['H'], ['C_PCH','OBJ'], ['<pch>on', '<toolset>msvc']))
979 generators.register(MsvcPchGenerator('msvc.compile.c++.pch', False, ['H'], ['CPP_PCH','OBJ'], ['<pch>on', '<toolset>msvc']))
980
981 generators.override('msvc.compile.c.pch', 'pch.default-c-pch-generator')
982 generators.override('msvc.compile.c++.pch', 'pch.default-cpp-pch-generator')
983
984 toolset.flags('msvc.compile', 'PCH_FILE' , ['<pch>on'], ['<pch-file>' ])
985 toolset.flags('msvc.compile', 'PCH_SOURCE', ['<pch>on'], ['<pch-source>'])
986 toolset.flags('msvc.compile', 'PCH_HEADER', ['<pch>on'], ['<pch-header>'])
987
988 #

Callers 1

register_toolsetFunction · 0.85

Calls 3

MsvcPchGeneratorClass · 0.85
registerMethod · 0.45

Tested by

no test coverage detected