Skip to content

Commit

Permalink
resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
chitalu committed Feb 18, 2024
2 parents b0bcba7 + 28daefc commit 047d75f
Show file tree
Hide file tree
Showing 82 changed files with 8,292 additions and 8,956 deletions.
129 changes: 129 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Checkout config tool: https://zed0.co.uk/clang-format-configurator/
# Or http://cf.monofraps.net/
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# https://github.com/01org/parameter-framework/blob/master/.clang-format

# Tested on: clang-format version 6.0.1


# Common settings
BasedOnStyle: WebKit
TabWidth: 4
IndentWidth: 4
UseTab: Always
ColumnLimit: 100

# Other languages JavaScript, Proto

---
Language: Cpp

# http://releases.llvm.org/6.0.1/tools/clang/docs/ClangFormatStyleOptions.html#disabling-formatting-on-a-piece-of-code
# int formatted_code;
# // clang-format off
# void unformatted_code ;
# // clang-format on
# void formatted_code_again;

DisableFormat: false
Standard: Cpp11

AccessModifierOffset: -4
AlignAfterOpenBracket: true
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false

# Configure each individual brace in BraceWrapping
BreakBeforeBraces: Custom
# Control of individual brace wrapping cases
BraceWrapping: {
AfterClass: 'true'
AfterControlStatement: 'true'
AfterEnum : 'true'
AfterFunction : 'true'
AfterNamespace : 'true'
AfterStruct : 'true'
AfterUnion : 'true'
BeforeCatch : 'true'
BeforeElse : 'true'
IndentBraces : 'false'
AfterExternBlock : 'true'
SplitEmptyFunction : 'false'
SplitEmptyRecord : 'false'
SplitEmptyNamespace : 'true'
}

BreakAfterJavaFieldAnnotations: true
BreakBeforeInheritanceComma: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakStringLiterals: true

CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
SpaceBeforeCpp11BracedList: false
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IndentCaseLabels: false
FixNamespaceComments: true
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
JavaScriptQuotes: Double
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000

PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Never
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceAfterTemplateKeyword: true
SpaceBeforeInheritanceColon: true

SortUsingDeclarations: true
SortIncludes: true

# Comments are for developers, they should arrange them
ReflowComments: false

IncludeBlocks: Preserve
IndentPPDirectives: AfterHash
---
87 changes: 87 additions & 0 deletions CLA
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# CONTRIBUTOR AGREEMENTS

The MCUT project follows the Apache Software Foundation [model](https://apache.org/licenses/contributor-agreements.html) when handling contributions. The project relies on two agreements to accept contributions of software code and documentation from individuals and corporations, respectively.

These agreements help achieve the goal of providing a reliable and long-lived software product through collaborative, open-source software development. In all cases, contributors retain full rights to use their original contributions for any other purpose outside of MCUT, while providing CutDigital Enterprise Ltd (copyright owner) the right to distribute and build upon their work.

# CONTRIBUTOR LICENSE AGREEMENTS (CLA)

## Overview

The Individual Contributor License Agreement (ICLA) is provided below. The purpose of this agreement is to clearly define the terms under which intellectual property has been contributed to the MCUT project and thereby allow the copyright holder of the MCUT project to defend it should there be a legal dispute regarding the software. By contribution of ideas, code, or documentation to the MCUT project, a contributor acknowledges that they are bound by the terms laid out herein. The ICLA an individual acknowledges is not tied to any employer they may have.

The Corporate Contributor License Agreement (CCLA) is also provided below. The CCLA is available to cover contributing intellectual property via a corporation that may have been assigned as part of an employment agreement. Note that a Corporate CLA does not remove the need for every developer to acknowledge their own ICLA as an individual, which covers both contributions the corporation owns, and those it does not own. The CCLA legally binds the corporation, so a person with authority to enter into legal contracts on behalf of the corporation must acknowledge it.

CutDigital Enterprise will not publish your personal details as a contributor in any form except possibly via the revision history in source control.

## Individual Contributor License Agreement

This agreement is for your protection as a Contributor as well as the protection of CutDigital Enterprise, the MCUT project and its users. It does not change your rights to use your own Contributions for any other purpose.

Read this text carefully before making a contribution and keep a copy for your records.

You accept and agree to the following terms and conditions for Your Contributions (present and future) that you submit to the MCUT project. In return, CutDigital Enterprise shall not use Your Contributions in a way that is contrary to the public benefit and bylaws in effect at the time of the Contribution. Except for the license granted herein to CutDigital Enterprise, You reserve all right, title, and interest in and to Your Contributions.

1. Definitions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with CutDigital Enterprise. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

"Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to CutDigital Enterprise for inclusion in, or documentation of, any of the products owned or managed by CutDigital Enterprise (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to CutDigital Enterprise or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, CutDigital Enterprise for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."

2. Grant of Copyright License.

Subject to the terms and conditions of this Agreement, You hereby grant to CutDigital Enterprise a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.

3. Grant of Patent License.

Subject to the terms and conditions of this Agreement, You hereby grant to CutDigital Enterprise a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement forthat Contribution or Work shall terminate as of the date such litigation is filed.

4. You represent that you are legally entitled to grant the above license.

If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to CutDigital Enterprise, or that your employer has executed a separate Corporate CLA with CutDigital Enterprise.

5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others).

You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of YourContributions.

6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support.

You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.

7. Should You wish to submit work that is not Your original creation, You may submit it to CutDigital Enterprise separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".

8. You agree to notify CutDigital Enterprise of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.

## Corporate Contributor License Agreement

This version of the Agreement allows an entity (the "Corporation") to submit Contributions to the MCUT project, to authorize Contributions submitted by its designated employees, and to grant copyright and patent licenses.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the MCUT project. In return, the CutDigital Enterprise shall not use Your Contributions in a way that is contrary to the public benefit and bylaws in effect at the time of the Contribution. Except for the license granted herein to the CutDigital Enterprise, You reserve all right, title, and interest in and to Your Contributions.

1. Definitions.

"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with the CutDigital Enterprise. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

"Contribution" shall mean the code, documentation or other original works of authorship expressly identified, as well as any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to the CutDigital Enterprise for inclusion in, or documentation of, any of the products owned or managed by the CutDigital Enterprise (the "Work"). For the purposes of this definition, "identified" and "submitted" mean any form of electronic, verbal, or written communication sent to the CutDigital Enterprise or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the CutDigital Enterprise for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."

2. Grant of Copyright License.

Subject to the terms and conditions of this Agreement, You hereby grant to the CutDigital Enterprise a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.

3. Grant of Patent License.

Subject to the terms and conditions of this Agreement, You hereby grant to the CutDigital Enterprise a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) were submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.

4. You represent that You are legally entitled to grant the above license.

You represent further that each designated employee of the Corporation is authorized to submit Contributions on behalf of the Corporation.

5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others).

6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support.

You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, ON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.

7. Should You wish to submit work that is not Your original creation, You may submit it to CutDigital Enterprise separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limitedto, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".

8. It is your responsibility to notify the CutDigital Enterprise when any change is required to the list of designated employees authorized to submit Contributions on behalf of the Corporation, or to the Corporation's Point of Contact with the CutDigital Enterprise.
86 changes: 18 additions & 68 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
#
# Copyright (c) 2021-2022 Floyd M. Chitalu.
# All rights reserved.
#
# NOTE: This file is licensed under GPL-3.0-or-later (default).
# A commercial license can be purchased from Floyd M. Chitalu.
#
# License details:
#
# (A) GNU General Public License ("GPL"); a copy of which you should have
# recieved with this file.
# - see also: <http://www.gnu.org/licenses/>
# (B) Commercial license.
# - email: [email protected]
#
# The commercial license options is for users that wish to use MCUT in
# their products for comercial purposes but do not wish to release their
# software products under the GPL license.
#
# Author(s) : Floyd M. Chitalu
#
############################################################################################
#
# You can configure MCUT with the following CMake options:
#
# MCUT_BUILD_AS_SHARED_LIB [default=ON] - Build MCUT as a shared/dynamic library (.so/.dll).
Expand Down Expand Up @@ -233,57 +211,29 @@ if(${MCUT_BUILD_TESTS} OR ${MCUT_BUILD_TUTORIALS})
endif()

FetchContent_Populate(
libigl
GIT_REPOSITORY https://github.com/libigl/libigl.git
GIT_TAG v2.3.0
GIT_PROGRESS TRUE
mio
GIT_REPOSITORY https://github.com/cutdigital/mio.git
GIT_TAG main
)

#set(libigl_include_dir ${CMAKE_BINARY_DIR}/libigl-src/include)
set(libigl_include_dir ${libigl_SOURCE_DIR}/include)

set(LIBIGL_EIGEN_VERSION 3.3.7 CACHE STRING "Default version of Eigen used by libigl.")

# used by tests & tutorials
#download_project(PROJ eigen
# GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
# GIT_TAG ${LIBIGL_EIGEN_VERSION}
# ${UPDATE_DISCONNECTED_IF_AVAILABLE}
#)
FetchContent_Declare(
eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG ${LIBIGL_EIGEN_VERSION}
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
set(mio_include_dir ${mio_SOURCE_DIR}/include)

set(EIGEN_BUILD_DOC OFF)
# note: To disable eigen tests,
# you should put this code in a add_subdirectory to avoid to change
# BUILD_TESTING for your own project too since variables are directory
# scoped
set(BUILD_TESTING OFF)
set(EIGEN_BUILD_PKGCONFIG OFF)
set( OFF)
FetchContent_MakeAvailable(eigen)

#set(eigen_include_dir ${CMAKE_BINARY_DIR}/eigen-src)
set(eigen_include_dir ${eigen_SOURCE_DIR})
endif()
add_subdirectory(${mio_SOURCE_DIR} build)

#
# tests
#
if(MCUT_BUILD_TESTS)
add_subdirectory(tests)
endif()
#
# tests
#
if(MCUT_BUILD_TESTS)
add_subdirectory(tests)
endif()

#
# tutorials
#
if(MCUT_BUILD_TUTORIALS)
add_subdirectory(tutorials)
endif()

#
# tutorials
#
if(MCUT_BUILD_TUTORIALS)
add_subdirectory(tutorials)
endif()

#
Expand Down
17 changes: 17 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# CONTRIBUTORS

This file provides the list of MCUT authors/contributors for legal purposes.
The file does not necessarily list everyone who has contributed, since in some
cases, their employer may be the copyright holder. To see the full list of
contributors, see the revision history in source control.

## LIST

* Floyd M. Chitalu

# CONTRIBUTOR LICENSE AGREEMENT (CLA)

The terms and conditions that apply to contributor of the MCUT project can be
found in the file called "CLA". By making a contribution, a contributor
acknowledges that they have read and accepted the terms and conditions therein.

File renamed without changes.
Loading

0 comments on commit 047d75f

Please sign in to comment.