-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2195148
Showing
487 changed files
with
191,771 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
# https://releases.llvm.org/7.0.0/tools/clang/docs/ClangFormatStyleOptions.html | ||
|
||
--- | ||
# Language: Cpp | ||
|
||
BasedOnStyle: LLVM | ||
|
||
# AccessModifierOffset: -2 | ||
AccessModifierOffset: -4 | ||
|
||
# AlignAfterOpenBracket: Align | ||
AlignAfterOpenBracket: DontAlign | ||
|
||
# AlignConsecutiveAssignments: false | ||
AlignConsecutiveAssignments: true | ||
|
||
# AlignConsecutiveDeclarations: false | ||
|
||
# AlignEscapedNewlines: Right | ||
AlignEscapedNewlines: Left | ||
|
||
# AlignOperands: true | ||
|
||
# AlignTrailingComments: true | ||
AlignTrailingComments: false | ||
|
||
# AllowAllParametersOfDeclarationOnNextLine: true | ||
# AllowShortBlocksOnASingleLine: false | ||
# AllowShortCaseLabelsOnASingleLine: false | ||
|
||
# AllowShortFunctionsOnASingleLine: All | ||
AllowShortFunctionsOnASingleLine: Empty | ||
|
||
# AllowShortIfStatementsOnASingleLine: false | ||
# AllowShortLoopsOnASingleLine: false | ||
# AlwaysBreakAfterDefinitionReturnType: None | ||
# AlwaysBreakAfterReturnType: None | ||
# AlwaysBreakBeforeMultilineStrings: false | ||
|
||
# Clang 7 default: | ||
# AlwaysBreakTemplateDeclarations: MultiLine | ||
# Clang 7 customization: | ||
# AlwaysBreakTemplateDeclarations: Yes | ||
# Clang 6 compatible customization: | ||
AlwaysBreakTemplateDeclarations: true | ||
|
||
# BinPackArguments: true | ||
# BinPackParameters: true | ||
# BraceWrapping: | ||
# AfterClass: false | ||
# AfterControlStatement: false | ||
# AfterEnum: false | ||
# AfterFunction: false | ||
# AfterNamespace: false | ||
# AfterObjCDeclaration: false | ||
# AfterStruct: false | ||
# AfterUnion: false | ||
# AfterExternBlock: false | ||
# BeforeCatch: false | ||
# BeforeElse: false | ||
# IndentBraces: false | ||
# SplitEmptyFunction: true | ||
# SplitEmptyRecord: true | ||
# SplitEmptyNamespace: true | ||
|
||
# BreakBeforeBinaryOperators: None | ||
BreakBeforeBinaryOperators: NonAssignment | ||
|
||
# BreakBeforeBraces: Attach | ||
# BreakBeforeInheritanceComma: false | ||
# BreakInheritanceList: BeforeColon | ||
# BreakBeforeTernaryOperators: true | ||
# BreakConstructorInitializersBeforeComma: false | ||
# BreakConstructorInitializers: BeforeColon | ||
# BreakAfterJavaFieldAnnotations: false | ||
# BreakStringLiterals: true | ||
|
||
# ColumnLimit: 80 | ||
ColumnLimit: 120 | ||
|
||
# CommentPragmas: '^ IWYU pragma:' | ||
# CompactNamespaces: false | ||
# ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
# ConstructorInitializerIndentWidth: 4 | ||
# ContinuationIndentWidth: 4 | ||
# Cpp11BracedListStyle: true | ||
# DerivePointerAlignment: false | ||
# DisableFormat: false | ||
# ExperimentalAutoDetectBinPacking: false | ||
|
||
# NOTE: LLVM#39247, this emits damaged "// namespace _DEPRECATE_TR1_NAMESPACEtr1". | ||
# FixNamespaceComments: true | ||
FixNamespaceComments: false | ||
|
||
# ForEachMacros: | ||
# - foreach | ||
# - Q_FOREACH | ||
# - BOOST_FOREACH | ||
|
||
# IncludeBlocks: Preserve | ||
IncludeBlocks: Regroup | ||
|
||
# IncludeCategories: | ||
# - Regex: '^"(llvm|llvm-c|clang|clang-c)/' | ||
# Priority: 2 | ||
# - Regex: '^(<|"(gtest|gmock|isl|json)/)' | ||
# Priority: 3 | ||
# - Regex: '.*' | ||
# Priority: 1 | ||
IncludeCategories: | ||
- Regex: '^<yvals(_core)?\.h>$' | ||
Priority: 1 | ||
- Regex: '^<Windows\.h>$' | ||
Priority: 3 | ||
- Regex: '^<WinIoCtl\.h>$' | ||
Priority: 4 | ||
- Regex: '.*' | ||
Priority: 2 | ||
|
||
# IncludeIsMainRegex: '(Test)?$' | ||
# IndentCaseLabels: false | ||
# IndentPPDirectives: None | ||
|
||
# IndentWidth: 2 | ||
IndentWidth: 4 | ||
|
||
# IndentWrappedFunctionNames: false | ||
IndentWrappedFunctionNames: true | ||
|
||
# JavaScriptQuotes: Leave | ||
# JavaScriptWrapImports: true | ||
# KeepEmptyLinesAtTheStartOfBlocks: true | ||
|
||
# NOTE: MacroBlockBegin/MacroBlockEnd don't work with _CATCH_ALL. | ||
# MacroBlockBegin: '' | ||
# MacroBlockEnd: '' | ||
|
||
# MaxEmptyLinesToKeep: 1 | ||
MaxEmptyLinesToKeep: 2 | ||
|
||
# NamespaceIndentation: None | ||
NamespaceIndentation: All | ||
|
||
# ObjCBinPackProtocolList: Auto | ||
# ObjCBlockIndentWidth: 2 | ||
# ObjCSpaceAfterProperty: false | ||
# ObjCSpaceBeforeProtocolList: true | ||
# PenaltyBreakAssignment: 2 | ||
# PenaltyBreakBeforeFirstCallParameter: 19 | ||
# PenaltyBreakComment: 300 | ||
# PenaltyBreakFirstLessLess: 120 | ||
# PenaltyBreakString: 1000 | ||
# PenaltyBreakTemplateDeclaration: 10 | ||
# PenaltyExcessCharacter: 1000000 | ||
# PenaltyReturnTypeOnItsOwnLine: 60 | ||
|
||
# PointerAlignment: Right | ||
PointerAlignment: Left | ||
|
||
# ReflowComments: true | ||
# SortIncludes: true | ||
# SortUsingDeclarations: true | ||
|
||
# SpaceAfterCStyleCast: false | ||
SpaceAfterCStyleCast: true | ||
|
||
# SpaceAfterTemplateKeyword: true | ||
# SpaceBeforeAssignmentOperators: true | ||
# SpaceBeforeCpp11BracedList: false | ||
# SpaceBeforeCtorInitializerColon: true | ||
# SpaceBeforeInheritanceColon: true | ||
# SpaceBeforeParens: ControlStatements | ||
# SpaceBeforeRangeBasedForLoopColon: true | ||
# SpaceInEmptyParentheses: false | ||
# SpacesBeforeTrailingComments: 1 | ||
# SpacesInAngles: false | ||
# SpacesInContainerLiterals: true | ||
# SpacesInCStyleCastParentheses: false | ||
# SpacesInParentheses: false | ||
# SpacesInSquareBrackets: false | ||
# Standard: Cpp11 | ||
# TabWidth: 8 | ||
# UseTab: Never | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
# Disable CRLF-mapping for all files. | ||
* -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
cmake_minimum_required(VERSION 3.15) | ||
project(msvc_standard_libraries LANGUAGES CXX) | ||
|
||
find_package(Boost REQUIRED) | ||
|
||
set(VCLIBS_MIN_BOOST_VERSION 1.70.0) | ||
if("${Boost_VERSION}" VERSION_LESS "${VCLIBS_MIN_BOOST_VERSION}") | ||
message(FATAL_ERROR "Detected Boost version is too old (older than ${VCLIBS_MIN_BOOST_VERSION}).") | ||
endif() | ||
|
||
set(VCLIBS_SUFFIX "_oss") | ||
|
||
if(NOT VCPKG_TARGET_ARCHITECTURE) | ||
message(FATAL_ERROR "You must set VCPKG_TARGET_ARCHITECTURE.") | ||
endif() | ||
|
||
if("${VCPKG_TARGET_ARCHITECTURE}" STREQUAL "x86") | ||
set(VCLIBS_I386_OR_AMD64 "i386") | ||
set(VCLIBS_X86_OR_X64 "x86") | ||
add_compile_definitions(_X86_) | ||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") | ||
set(VCLIBS_I386_OR_AMD64 "amd64") | ||
set(VCLIBS_X86_OR_X64 "x64") | ||
add_compile_definitions(_AMD64_) | ||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") | ||
set(VCLIBS_I386_OR_AMD64 "arm") | ||
set(VCLIBS_X86_OR_X64 "arm") | ||
add_compile_definitions(_ARM_) | ||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") | ||
set(VCLIBS_I386_OR_AMD64 "arm64") | ||
set(VCLIBS_X86_OR_X64 "arm64") | ||
add_compile_definitions(_ARM64_) | ||
else() | ||
message(FATAL_ERROR "Could not determine target architecture") | ||
endif() | ||
|
||
add_compile_definitions(_VCRT_WIN32_WINNT=_WIN32_WINNT_WINXP _STL_WIN32_WINNT=_WIN32_WINNT_WINXP | ||
_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH WIN32_LEAN_AND_MEAN STRICT _CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS | ||
_CRT_DECLARE_NONSTDC_NAMES=1 _WIN32_WINNT=0x0602 NTDDI_VERSION=NTDDI_WIN8) | ||
|
||
set(CMAKE_CXX_FLAGS "") | ||
set(CMAKE_CXX_FLAGS_DEBUG "") | ||
set(CMAKE_CXX_FLAGS_RELEASE "") | ||
set(CMAKE_CXX_STANDARD_LIBRARIES "") | ||
set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "") | ||
set(CMAKE_MSVC_RUNTIME_LIBRARY "") | ||
|
||
# TRANSITION, /analyze ? | ||
# TRANSITION, /d2FH4- ? | ||
add_compile_options(/diagnostics:caret /W4 /WX /w14265 /w15038 /d1FastFail /guard:cf /Z7 /d2Zi+ /Gm- /Gy /Zp8 /std:c++latest /permissive- /Zc:threadSafeInit- /d2FH4-) | ||
add_compile_options($<$<STREQUAL:x86,${VCPKG_TARGET_ARCHITECTURE}>:/arch:IA32>) | ||
|
||
set(VCLIBS_DEBUG_OPTIONS "/Od") | ||
set(VCLIBS_RELEASE_FLAGS "/O2;/Os") # TRANSITION: Potentially remove /Os | ||
|
||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/lib/${VCLIBS_I386_OR_AMD64}") | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/lib/${VCLIBS_I386_OR_AMD64}") | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/out/bin/${VCLIBS_I386_OR_AMD64}") | ||
|
||
set(CMAKE_STATIC_LINKER_FLAGS "/WX") | ||
set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "") | ||
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "") | ||
set(CMAKE_SHARED_LINKER_FLAGS "/DEBUG:FULL /WX /RELEASE /SUBSYSTEM:Console /NODEFAULTLIB /INCREMENTAL:NO /MANIFEST:NO /DLL /profile /guard:cf /DEBUGTYPE:cv,fixup /LARGEADDRESSAWARE") | ||
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "") | ||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "") | ||
|
||
get_filename_component(TOOLSET_BINARIES_DIR "${CMAKE_CXX_COMPILER}" DIRECTORY) # Example: $\VC\Tools\MSVC\14.23.27931\bin\Hostx86\x86 | ||
get_filename_component(TOOLSET_ROOT_DIR "${TOOLSET_BINARIES_DIR}" DIRECTORY) # $\VC\Tools\MSVC\14.23.27931\bin\Hostx86 | ||
get_filename_component(TOOLSET_ROOT_DIR "${TOOLSET_ROOT_DIR}" DIRECTORY) # $\VC\Tools\MSVC\14.23.27931\bin | ||
get_filename_component(TOOLSET_ROOT_DIR "${TOOLSET_ROOT_DIR}" DIRECTORY) # $\VC\Tools\MSVC\14.23.27931 | ||
|
||
set(TOOLSET_LIB "${TOOLSET_ROOT_DIR}/lib/${VCLIBS_X86_OR_X64}") | ||
|
||
add_subdirectory(stl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Contributing | ||
|
||
This project welcomes contributions and suggestions. Most contributions require you to agree to a | ||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us | ||
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. | ||
|
||
When you submit a pull request, a CLA bot will automatically determine whether you need to provide | ||
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions | ||
provided by the bot. You will only need to do this once across all repos using our CLA. | ||
|
||
# Code of Conduct | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or | ||
contact [[email protected]](mailto:[email protected]) with any additional questions or comments. |
Oops, something went wrong.