Skip to content

Commit adff20b

Browse files
committed
Merge branch 'bootstrap' into 'develop'
Bootstrap repository See merge request csparker247/openabf!2
2 parents 27ebae6 + d2bc483 commit adff20b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+8474
-98
lines changed

.gitlab-ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
### Prototype build jobs ###
2+
.build_script: &build_script
3+
- mkdir -p build/
4+
- cd build/
5+
- echo $CMAKE_CMD
6+
- $CMAKE_CMD
7+
- ninja
8+
9+
.test_script: &test_script
10+
- ctest -V
11+
12+
.build:
13+
variables:
14+
EXTRA_CMAKE_FLAGS: ""
15+
before_script:
16+
- export CMAKE_CMD="cmake -GNinja $EXTRA_CMAKE_FLAGS .."
17+
script:
18+
- *build_script
19+
20+
.build_and_test:
21+
extends: .build
22+
script:
23+
- *build_script
24+
- *test_script
25+
26+
### Tests ###
27+
test:debian:10:
28+
extends: .build_and_test
29+
stage: test
30+
needs: []
31+
image: volcart/vcbuilder-debian:10_v1.static
32+
variables:
33+
EXTRA_CMAKE_FLAGS: "-DOPENABF_BUILD_TESTS=ON"
34+
tags:
35+
- docker

.zenodo.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"title": "OpenABF",
3+
"description": "A header-only library of angle-based flattening algorithms for C++.",
4+
"upload_type": "software",
5+
"license": "other-open",
6+
"creators": [
7+
{
8+
"orcid": "0000-0002-3887-1237",
9+
"affiliation": "University of Kentucky",
10+
"name": "Parker, C. Seth"
11+
}
12+
],
13+
"keywords" : [
14+
"c-plus-plus",
15+
"parameterization",
16+
"flattening"
17+
],
18+
"related_identifiers": [
19+
{
20+
"scheme": "url",
21+
"identifier": "https://gitlab.com/educelab/OpenABF/",
22+
"relation": "isSupplementTo"
23+
},
24+
{
25+
"scheme": "url",
26+
"identifier": "https://github.com/educelab/OpenABF/",
27+
"relation": "isSupplementTo"
28+
}
29+
]
30+
}

CMakeLists.txt

Lines changed: 75 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,79 @@
1-
cmake_minimum_required(VERSION 3.17)
2-
project(OpenABF)
1+
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
2+
project(OpenABF VERSION 1.0)
33

4-
set(CMAKE_CXX_STANDARD 14)
4+
# Setup project directories
5+
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
6+
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
7+
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
58

6-
include_directories(${CMAKE_SOURCE_DIR}/include)
7-
set(public_hdrs
8-
include/OpenABF/ABF.hpp
9-
include/OpenABF/HalfEdgeMesh.hpp
9+
# Modules
10+
include(FetchContent)
11+
include(CMakeDependentOption)
12+
13+
# Find dependencies
14+
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
15+
16+
option(OPENABF_MULTIHEADER "Build the multi-header version of OpenABF" off)
17+
18+
# OpenABF Library
19+
if(OPENABF_MULTIHEADER)
20+
set(public_hdrs
21+
include/OpenABF/OpenABF.hpp
22+
include/OpenABF/ABF.hpp
23+
include/OpenABF/ABFPlusPlus.hpp
24+
include/OpenABF/Exceptions.hpp
25+
include/OpenABF/HalfEdgeMesh.hpp
26+
include/OpenABF/AngleBasedLSCM.hpp
27+
include/OpenABF/Math.hpp
28+
include/OpenABF/Vector.hpp
29+
)
30+
set(OPENABF_LINK_DIR ${PROJECT_SOURCE_DIR}/include/)
31+
message(STATUS "Using multi-header OpenABF library: ${OPENABF_LINK_DIR}")
32+
else()
33+
set(public_hdrs single_include/OpenABF/OpenABF.hpp)
34+
set(OPENABF_LINK_DIR ${PROJECT_SOURCE_DIR}/single_include/)
35+
message(STATUS "Using single-header OpenABF library: ${OPENABF_LINK_DIR}")
36+
endif()
37+
38+
add_library(OpenABF INTERFACE)
39+
add_library(OpenABF::OpenABF ALIAS OpenABF)
40+
target_include_directories(OpenABF
41+
INTERFACE
42+
$<BUILD_INTERFACE:${OPENABF_LINK_DIR}>
43+
$<INSTALL_INTERFACE:include>
44+
)
45+
target_compile_features(OpenABF INTERFACE cxx_std_14)
46+
set_target_properties(OpenABF
47+
PROPERTIES
48+
PUBLIC_HEADER "${public_hdrs}"
1049
)
50+
target_link_libraries(OpenABF
51+
INTERFACE
52+
Eigen3::Eigen
53+
)
54+
install(
55+
TARGETS OpenABF
56+
EXPORT OpenABFTargets
57+
ARCHIVE DESTINATION "lib"
58+
LIBRARY DESTINATION "lib"
59+
INCLUDES DESTINATION "include/OpenABF"
60+
PUBLIC_HEADER DESTINATION "include/OpenABF"
61+
)
62+
63+
# Docs
64+
find_package(Doxygen OPTIONAL_COMPONENTS dot)
65+
CMAKE_DEPENDENT_OPTION(OPENABF_BUILD_DOCS "Build Doxygen documentation" on "DOXYGEN_FOUND" off)
66+
if(OPENABF_BUILD_DOCS)
67+
add_subdirectory(docs)
68+
endif()
69+
70+
# Tests
71+
option(OPENABF_BUILD_TESTS "Compile OpenABF unit tests" off)
72+
if(OPENABF_BUILD_TESTS)
73+
enable_testing()
74+
add_subdirectory(tests)
75+
endif()
1176

12-
add_executable(abf_test ${public_hdrs} main.cpp)
77+
# Example app
78+
add_executable(abf_test main.cpp)
79+
target_link_libraries(abf_test OpenABF::OpenABF)

CONTRIBUTING.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Contributing to OpenABF
2+
3+
OpenABF is maintained by [EduceLab](https://cs.uky.edu/dri) and developed in
4+
collaboration with our community of contributors. We welcome bug reports,
5+
feature requests, and code contributions.
6+
7+
## Bug Reports and Feature Requests
8+
If you think you have found a bug or if you would like to request a new
9+
feature, please check our
10+
[issue tracker](https://gitlab.com/educelab/OpenABF/-/issues) to make sure
11+
an issue has not already been opened on your topic.
12+
13+
## Workflow
14+
1) Fork this repository
15+
2) Create a new branch in the forked repository
16+
- If your branch addresses an issue from the Issue Tracker, please prepend
17+
your branch name with the issue number (e.g. `9-fixes-a-bug`). This will
18+
ensure that your branch and Merge Request are properly linked to the issue.
19+
3) Open a Merge Request from your branch to this repository
20+
- If your branch is not ready to be merged, prepend `WIP:` to the Merge
21+
Request title. This will keep an itinerant project manager from accidentally
22+
merging an incomplete feature. When you are ready for code review, remove
23+
the `WIP:` prefix.
24+
4) Code review
25+
5) Merge
26+
27+
## Code style
28+
This project uses `clang-format` to maintain a consistent code style
29+
throughout the code base. Code which has not been processed with
30+
this tool will not be merged.
31+
32+
The easiest way to maintain a consistent style is to process all changes
33+
with `git clang-format` before they are committed:
34+
35+
```shell
36+
# Stage original changes
37+
git add .
38+
39+
# Run clang-format on staged changes
40+
git clang-format
41+
42+
# Stage formatting changes and commit
43+
git add .
44+
git commit -m "My commit message."
45+
```
46+
47+
Don't worry if you forget to run this process before committing! You can
48+
always process an entire branch's diff by comparing against the default
49+
branch:
50+
51+
```shell
52+
git clang-format dev
53+
```
54+
55+
Unfortunately, `clang-format` does not handle all style issues. For a general
56+
overview of the EduceLab C++ style, please refer to our
57+
[C++ style guide](https://gitlab.com/educelab/style-guides/-/blob/master/C++%20Style%20Guide.md).
58+
59+
## License
60+
Any changes intentionally contributed to this repository are assumed to
61+
be licensed under the terms outlined in `LICENSE`.
62+
63+
## Attribution
64+
This project actively maintains a citable record on Zenodo.
65+
We are happy to list our active community of contributors as authors on
66+
this record. After you have contributed 10 or more commits to this project,
67+
please open a new pull request which adds your name and ORCID to
68+
`.zenodo.json`.

0 commit comments

Comments
 (0)