Skip to content

Commit

Permalink
Drop cpput, C++14, various small fixes and updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
asherikov committed Jan 22, 2025
1 parent 53edb8a commit f58efe0
Show file tree
Hide file tree
Showing 60 changed files with 182 additions and 15,443 deletions.
56 changes: 27 additions & 29 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,58 +1,56 @@
{
"BasedOnStyle": "Google",
"AccessModifierOffset": -4,
"ConstructorInitializerIndentWidth": 2,
"AlignAfterOpenBracket": "AlwaysBreak",
"AlignEscapedNewlinesLeft": false,
"AlignTrailingComments": true,
"AllowAllParametersOfDeclarationOnNextLine": false,
"AllowShortIfStatementsOnASingleLine": false,
"AllowShortLoopsOnASingleLine": false,
"AllowShortFunctionsOnASingleLine": "None",
"AllowShortIfStatementsOnASingleLine": false,
"AllowShortLoopsOnASingleLine": false,
"AlwaysBreakTemplateDeclarations": true,
"AlwaysBreakBeforeMultilineStrings": false,
"AlwaysBreakTemplateDeclarations": true,
"BasedOnStyle": "Google",
"BinPackArguments": false,
"BinPackParameters": false,
"BreakBeforeBinaryOperators": "NonAssignment",
"BreakBeforeBraces": "Allman",
"BreakBeforeTernaryOperators": false,
"BreakConstructorInitializersBeforeComma": true,
"BreakStringLiterals": false,
"BinPackParameters": false,
"BinPackArguments": false,
"ColumnLimit": 120,
"ColumnLimit": 120,
"ConstructorInitializerAllOnOneLineOrOnePerLine": true,
"ConstructorInitializerIndentWidth": 2,
"ContinuationIndentWidth": 8,
"Cpp11BracedListStyle": false,
"DerivePointerAlignment": false,
"DerivePointerBinding": true,
"ExperimentalAutoDetectBinPacking": false,
"FixNamespaceComments": true,
"IndentCaseLabels": true,
"IndentFunctionDeclarationAfterType": false,
"IndentPPDirectives": "AfterHash",
"IndentWidth": 4,
"IndentWrappedFunctionNames": true,
"MaxEmptyLinesToKeep": 3,
"NamespaceIndentation": "All",
"ObjCSpaceBeforeProtocolList": true,
"PenaltyBreakBeforeFirstCallParameter": 19,
"PenaltyBreakComment": 60,
"PenaltyBreakString": 1,
"PenaltyBreakFirstLessLess": 1000,
"PenaltyBreakString": 1,
"PenaltyExcessCharacter": 500,
"PenaltyReturnTypeOnItsOwnLine": 1000,
"PointerAlignment": "Right",
"PointerBindsToType": false,
"SpacesBeforeTrailingComments": 2,
"Cpp11BracedListStyle": false,
"Standard": "Auto",
"IndentWidth": 4,
"TabWidth": 4,
"UseTab": "Never",
"BreakBeforeBraces": "Allman",
"IndentFunctionDeclarationAfterType": false,
"SpacesInParentheses": false,
"SpacesInAngles": false,
"SpaceInEmptyParentheses": false,
"SpacesInCStyleCastParentheses": false,
"SortIncludes": false,
"SpaceAfterControlStatementKeyword": true,
"SpaceBeforeAssignmentOperators": true,
"ContinuationIndentWidth": 8,
"SortIncludes": false,
"IndentPPDirectives": "AfterHash",
"DerivePointerAlignment": false,
"PointerAlignment": "Right",
"FixNamespaceComments": true,
"IndentWrappedFunctionNames": true,
"Standard": "Cpp03",
"SpaceInEmptyParentheses": false,
"SpacesBeforeTrailingComments": 2,
"SpacesInAngles": false,
"SpacesInCStyleCastParentheses": false,
"SpacesInParentheses": false,
"Standard": "c++17",
"TabWidth": 4,
"UseTab": "Never",
}
51 changes: 26 additions & 25 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ env:

jobs:
cpp_octave:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: sudo apt update
- run: make install_deps_common
- run: $APT libboost-all-dev libeigen3-dev octave liboctave-dev
- run: $APT clang-tidy-10
- run: $APT clang-tidy-13
- run: make test

latest_eigen:
Expand All @@ -29,7 +29,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: sudo apt update
- run: make install_deps_common
- run: $APT libboost-all-dev octave liboctave-dev
Expand All @@ -39,12 +39,12 @@ jobs:
- run: make unit_tests OPTIONS=test

dependency:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: $APT libeigen3-dev
- run: make build
- run: sudo make install
Expand All @@ -57,7 +57,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
source /opt/ros/noetic/setup.bash
make catkin_test_old ROS_DISTRO=noetic UBUNTU_DISTRO=focal
Expand All @@ -69,48 +69,49 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
source /opt/ros/noetic/setup.bash
make catkin_test_new ROS_DISTRO=noetic UBUNTU_DISTRO=focal
prerelease:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: make ros_prerelease ROS_DISTRO=noetic UBUNTU_DISTRO=focal BRANCH=`git branch --show-current`
env:
CCACHE_DIR: ${GITHUB_WORKSPACE}/.ccache
# empy compatibility issue
#prerelease:
# runs-on: ubuntu-20.04
# defaults:
# run:
# shell: bash
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - run: make ros_prerelease ROS_DISTRO=noetic UBUNTU_DISTRO=focal BRANCH=`git branch --show-current`
# env:
# CCACHE_DIR: ${GITHUB_WORKSPACE}/.ccache


jammy_scanbuild:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: sudo apt update
- run: $APT libboost-all-dev libeigen3-dev octave liboctave-dev
- run: $APT clang-tidy-13
- run: make clangcheck SCANBUILD=scan-build-13

deb:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: $APT libeigen3-dev
- run: make deb_install_deps
- run: make deb_any
- run: sudo dpkg -i build/qpmad-*-any.deb
- run: make test_dependency
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: deb
path: build/qpmad-*-any.deb
Expand All @@ -119,7 +120,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,31 @@ env:

jobs:
deb_cloudsmith:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: $APT libeigen3-dev
- run: make deb_install_deps_cloudsmith
- run: env CLOUDSMITH_API_KEY=${{ secrets.CLOUDSMITH_API_KEY }} make deb_cloudsmith_any


gh_pages:
runs-on: ubuntu-22.04

permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- run: $APT doxygen
- run: make dox
- run: |
cd doc/gh-pages
git config user.name github-actions
git config user.email [email protected]
git add *
git commit -a -m "Automated update ${{ github.ref_name }}"
git push
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
build
scanbuild_results
include/qpmad/config.h
include/qpmad/cpput*.h
matlab_octave/make.m
*.mex*
*.o
6 changes: 3 additions & 3 deletions .make/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ APT_INSTALL=sudo apt install -y --no-install-recommends
PIP_INSTALL=sudo python3 -m pip install
GEM_INSTALL=sudo gem install

CLANG_FORMAT?=clang-format13
SCANBUILD?=scan-build-13
CLANG_FORMAT?=clang-format18
SCANBUILD?=scan-build18


help:
Expand Down Expand Up @@ -61,7 +61,7 @@ spell_interactive:
# https://github.com/myint/scspell
spell:
${FIND_SOURCES} \
| xargs ${SPELL_XARGS_ARG} scspell --use-builtin-base-dict --override-dictionary ./qa/scspell.dict
| xargs ${SPELL_XARGS_ARG} scspell --use-builtin-base-dict --override-dictionary ./.make/qa/scspell.dict

clangcheck:
${SCANBUILD} \
Expand Down
1 change: 1 addition & 0 deletions qa/scspell.dict → .make/qa/scspell.dict
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ cholesky
copysign
cpput
decltype
dndebug
downdate
eigenut
fstream
Expand Down
9 changes: 2 additions & 7 deletions .make/qpmad.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FIND_SOURCES=find ./matlab_octave ./test/ ./include/ -iname "*.h" -or -iname "*.cpp" | grep -v "cpput_"
FIND_SOURCES=find ./matlab_octave ./test/ ./include/ -iname "*.h" -or -iname "*.cpp"

OPTIONS?=default
ROOT_DIR=../../
Expand Down Expand Up @@ -48,20 +48,17 @@ install_latest_eigen:


format:
${FIND_SOURCES} | grep -v "cpput" | grep -v "eigenut" | xargs ${CLANG_FORMAT} -verbose -i
${FIND_SOURCES} | xargs ${CLANG_FORMAT} -verbose -i


# utils
#----------------------------------------------

addutils:
-git remote add cmakeut https://github.com/asherikov/cmakeut --no-tags
-git remote add cpput https://github.com/asherikov/cpput --no-tags

updateutils:
git fetch --all
git rm --ignore-unmatch -rf cpput
git read-tree --prefix=cpput -u cpput/master
git show remotes/cmakeut/master:cmake/FindEigen3.cmake > cmake/FindEigen3.cmake
git show remotes/cmakeut/master:cmake/cmakeut_compiler_flags.cmake > cmake/cmakeut_compiler_flags.cmake
git show remotes/cmakeut/master:cmake/cmakeut_detect_func_macro.cmake > cmake/cmakeut_detect_func_macro.cmake
Expand Down Expand Up @@ -89,10 +86,8 @@ deb-cloudsmith: deb

clean: clean_common
rm -Rf include/qpmad/config.h
rm -Rf include/qpmad/cpput*.h
rm -Rf debian/ obj-*/
cd matlab_octave; ${MAKE} clean
cd cpput; ${MAKE} clean

forceclean: clean
cd matlab_octave; ${MAKE} forceclean
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
Changelog for package ariles_ros
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

next
----

* Added QPMAD_PEDANTIC_LICENSE cmake option to address
https://github.com/asherikov/qpmad/issues/9
* Require C++14.
* Drop cpput dependency and code generation.


1.3.0 (2022-12-10)
------------------

Expand Down
18 changes: 1 addition & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ set (CMAKEUT_CLANG_TIDY ${QPMAD_CLANG_TIDY})
set (CMAKEUT_CLANG_TIDY_EXTRA_IGNORES "-cert-err58-cpp,-cppcoreguidelines-avoid-non-const-global-variables")
# Eigen issues
set (CMAKEUT_CLANG_TIDY_EXTRA_IGNORES "${CMAKEUT_CLANG_TIDY_EXTRA_IGNORES},-clang-analyzer-core.uninitialized.Assign")
if ("${EIGEN3_VERSION}" VERSION_GREATER "3.4.0")
cmakeut_compiler_flags("c++14")
else()
cmakeut_compiler_flags("c++11")
endif()
cmakeut_compiler_flags("c++14")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKEUT_CXX_FLAGS}")
# --------------

Expand All @@ -85,18 +81,6 @@ write_basic_package_version_file(
# --------------


# --------------
# Dependencies
# --------------
# cpput
set(CPPUT_EMBEDDED ON CACHE BOOL "" FORCE)
set(CPPUT_EMBEDDED_ID "QPMAD_UTILS" CACHE STRING "" FORCE)
set(CPPUT_EMBEDDED_COPY_TO_DIR "${QPMAD_SOURCE_DIR}/${PROJECT_NAME}" CACHE STRING "" FORCE)
set(CPPUT_SELECT_HEADERS "config.h;exception.h" CACHE STRING "" FORCE)
add_subdirectory(cpput)
# --------------


# --------------
# Configure headers
# --------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Features:
<a name="dependencies"></a>
Dependencies:
=============
- C++11 compatible compiler
- C++14 compatible compiler
- cmake >= 3.0
- Eigen >= 3.3.0
- Boost (for C++ tests)
Expand Down
Loading

0 comments on commit f58efe0

Please sign in to comment.