-
Notifications
You must be signed in to change notification settings - Fork 15
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 2b2a71c
Showing
67 changed files
with
16,328 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,96 @@ | ||
--- | ||
# ClangFormat rules for Edge-lite style used in vc/common, etc. | ||
Language: Cpp | ||
AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: true | ||
AlignConsecutiveDeclarations: false | ||
AlignEscapedNewlines: DontAlign | ||
AlignOperands: true | ||
AlignTrailingComments: true | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortEnumsOnASingleLine: true | ||
AllowShortFunctionsOnASingleLine: Empty | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: true | ||
BinPackArguments: true | ||
BinPackParameters: false | ||
BraceWrapping: | ||
AfterClass: false | ||
AfterControlStatement: true | ||
AfterEnum: false | ||
AfterFunction: true | ||
AfterNamespace: false | ||
AfterStruct: false | ||
AfterUnion: false | ||
AfterExternBlock: true | ||
BeforeCatch: true | ||
BeforeElse: true | ||
IndentBraces: false | ||
SplitEmptyFunction: false | ||
SplitEmptyRecord: false | ||
SplitEmptyNamespace: true | ||
BreakBeforeBinaryOperators: NonAssignment | ||
BreakBeforeBraces: Custom | ||
BreakBeforeConceptDeclarations: Always | ||
BreakBeforeInheritanceComma: false | ||
BreakBeforeTernaryOperators: false | ||
BreakConstructorInitializers: BeforeColon | ||
BreakStringLiterals: false | ||
ColumnLimit: 120 | ||
CommentPragmas: '' | ||
CompactNamespaces: false | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
ConstructorInitializerIndentWidth: 2 | ||
ContinuationIndentWidth: 4 | ||
Cpp11BracedListStyle: true | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
ExperimentalAutoDetectBinPacking: false | ||
FixNamespaceComments: true | ||
ForEachMacros: [] | ||
IncludeBlocks: Preserve | ||
IncludeCategories: [] | ||
IncludeIsMainRegex: '' | ||
IndentCaseLabels: false | ||
IndentPPDirectives: None | ||
IndentWidth: 4 | ||
IndentWrappedFunctionNames: false | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
MacroBlockBegin: '^(CUSTOM_VALUE|OBJECT)_.*_JSON' | ||
MacroBlockEnd: '^END_(CUSTOM_VALUE|OBJECT)_.*_JSON' | ||
MaxEmptyLinesToKeep: 2 | ||
NamespaceIndentation: All | ||
PenaltyBreakAssignment: 2 | ||
PenaltyBreakBeforeFirstCallParameter: 19 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyBreakString: 1000 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 1000 | ||
PointerAlignment: Left | ||
RawStringFormats: [] | ||
ReflowComments: true | ||
#RequiresExpressionIndentation: OuterScope | ||
SortIncludes: false | ||
SortUsingDeclarations: true | ||
SpaceAfterCStyleCast: false | ||
SpaceAfterTemplateKeyword: false | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
Standard: Cpp11 | ||
StatementMacros: [] | ||
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,37 @@ | ||
name: CMake | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Configure CMake | ||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
|
||
- name: Build | ||
# Build your program with the given configuration | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
|
||
- name: Test | ||
working-directory: ${{github.workspace}}/build | ||
# Execute tests defined by the CMake configuration. | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: ctest -C ${{env.BUILD_TYPE}} | ||
|
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,3 @@ | ||
/build/ | ||
/linux-build/ | ||
|
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,26 @@ | ||
cmake_minimum_required (VERSION 3.14) | ||
project (ifc-sdk) | ||
|
||
# Fetch Microsoft GSL | ||
include(FetchContent) | ||
|
||
FetchContent_Declare(GSL | ||
GIT_REPOSITORY "https://github.com/microsoft/GSL" | ||
GIT_TAG "v4.0.0" | ||
) | ||
FetchContent_MakeAvailable(GSL) | ||
|
||
if (MSVC) | ||
add_compile_options( | ||
/EHsc # Turn on exception handling semantics | ||
) | ||
endif() | ||
|
||
# Add common properties | ||
set(CMAKE_CXX_STANDARD 20) | ||
|
||
add_definitions(-DVERSP_RELEASE=$<CONFIG:Release> -DVERSP_DEBUG=$<CONFIG:Debug> -DNOMINMAX) | ||
|
||
include_directories (include) | ||
|
||
add_subdirectory (src) |
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,9 @@ | ||
# Microsoft Open Source Code of Conduct | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
|
||
Resources: | ||
|
||
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) | ||
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) | ||
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns |
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,81 @@ | ||
# 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 grant us | ||
the right 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. | ||
|
||
## Scope | ||
The IFC SDK is an implementation of the [IFC Specification](https://github.com/microsoft/ifc-spec). We are purposefully | ||
limiting its scope to I/O operations for reading and writing IFC files, and to | ||
simple utilities for formatting or viewing IFC files. We welcome and we are looking | ||
for contributions that fix gaps between the SDK and the Specification, or | ||
for changes required to support C++ standards starting from C++20 and upwards. | ||
|
||
We are not yet accepting contributions that expand the project scope beyond adherence to the Specification, as explained above. However, if you build cool apps or projects on top of the SDK, we would love to hear about them. | ||
|
||
We are making the SDK available to the C++ community in the hope of helping to | ||
advance C++ Modules implementation across C++ compilers, and C++ Modules adoption in the C++ community at large. | ||
|
||
## Formatting | ||
There is a [.clang-format](.clang-format) file in the repo that should work with many editors automatically. Use the comment strings `// clang format off` and `// clang format on` to prevent automatic formatting when necessary to preserve specific formatting. | ||
|
||
## Coding Conventions | ||
Type names (e.g., classes, and enums) should use `PascalCase` naming convention. | ||
|
||
Functions, methods, data members, parameters, and variables should use `snake_case` naming convention (e.g., `bit_length`). | ||
|
||
Use the keywords `and`, `or`, and `not` rather than `&&`, `||`, and `!` for logical operators. | ||
|
||
## Submitting a Pull Request | ||
|
||
The SDK repo has open issues that track work which needs to be completed. | ||
If you are unsure of where to start, you may want to: | ||
|
||
* look for pinned issues, or | ||
* check issues under the labels [`good first issue`][label:"good first issue"], | ||
[`high priority`][label:"high priority"], or [`help wanted`][label:"help wanted"]. | ||
|
||
## Reviewing a Pull Request | ||
|
||
We love code reviews from contributors! Reviews from other contributors can often accelerate the reviewing process | ||
by helping a PR reach a more finished state before maintainers review the changes. As a result, such a PR may require | ||
fewer maintainer review iterations before reaching a "Ready to Merge" state. | ||
|
||
To gain insight into our Code Review process, you can check out: | ||
|
||
* pull requests which are [undergoing review][review:changes-requested] | ||
* [Advice for Reviewing Pull Requests][wiki:advice-for-reviewing] | ||
|
||
## PR Checklist | ||
|
||
Before submitting a pull request, please ensure: | ||
|
||
* Code has been formatted using the provided .clang-format file. | ||
* Naming conventions are following the recommendations. | ||
* Tests have been run locally (for at least one platform). | ||
* Changes that will impact the binary format of an IFC will need to synchronize with the compiler(s) affected and will likely require a version change. | ||
|
||
If your changes are derived from any other project, you _must_ mention it in the pull request description, | ||
so we can determine whether the license is compatible and whether any other steps need to be taken. | ||
|
||
# Microsoft Open Source Code of Conduct | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). | ||
|
||
Resources: | ||
|
||
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) | ||
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) | ||
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns | ||
|
||
[label:"good first issue"]: | ||
https://github.com/microsoft/IFC/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 | ||
[label:"high priority"]: https://github.com/microsoft/IFC/issues?q=is%3Aopen+is%3Aissue+label%3A%22high+priority%22 | ||
[label:"help wanted"]: https://github.com/microsoft/IFC/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22 | ||
[review:changes-requested]: https://github.com/microsoft/IFC/pulls?q=is%3Apr+is%3Aopen+review%3Achanges-requested | ||
[wiki:advice-for-reviewing]: https://github.com/microsoft/IFC/wiki/Advice-for-Reviewing-Pull-Requests | ||
[NOTICE.txt]: https://github.com/microsoft/IFC/blob/main/NOTICE.txt |
Oops, something went wrong.