-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
367 changed files
with
61,096 additions
and
5,056 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,59 @@ | ||
Checks: '*, | ||
-llvmlibc-*, -altera-*, -fuchsia-*, | ||
-modernize-use-trailing-return-type, | ||
-cppcoreguidelines-avoid-magic-numbers, | ||
-cppcoreguidelines-pro-bounds-pointer-arithmetic, | ||
-readability-magic-numbers, | ||
-misc-const-correctness, | ||
-llvm-header-guard, | ||
-hicpp-uppercase-literal-suffix, | ||
-readability-uppercase-literal-suffix, | ||
-readability-else-after-return, | ||
-llvm-else-after-return, | ||
-bugprone-easily-swappable-parameters, | ||
-google-readability-todo, | ||
-abseil-*, | ||
-android-cloexec-open' | ||
CheckOptions: | ||
- key: readability-identifier-naming.ClassCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.FunctionCase | ||
value: lower_case | ||
- key: readability-identifier-naming.VariableCase | ||
value: lower_case | ||
- key: readability-identifier-length.IgnoredVariableNames | ||
value: 'i|j|k|w|h|x|y|z|it' | ||
- key: readability-identifier-length.IgnoredLoopCounterNames | ||
value: 'i|j|k|w|h|x|y|z|it' | ||
- key: readability-identifier-length.IgnoredParameterNames | ||
value: 'w|h|x|y|z' | ||
- key: performance-unnecessary-value-param.AllowedTypes | ||
value: 'Eigen::Ref|sync_ptr' | ||
- key: readability-identifier-naming.ClassCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.MemberCase | ||
value: lower_case | ||
- key: readability-identifier-naming.ProtectedMemberSuffix | ||
value: _ | ||
- key: readability-identifier-naming.PrivateMemberSuffix | ||
value: _ | ||
- key: readability-identifier-naming.ClassMethodCase | ||
value: lower_case | ||
- key: readability-identifier-naming.EnumCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.EnumConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.ParameterCase | ||
value: lower_case | ||
- key: readability-identifier-naming.StructCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.TemplateParameterCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.NamespaceCase | ||
value: lower_case | ||
- key: readability-identifier-naming.MacroDefinitionCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.GlobalConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.FunctionCase | ||
value: lower_case |
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
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 |
---|---|---|
|
@@ -27,4 +27,5 @@ CTestTestfile.cmake | |
generated | ||
rules.ninja | ||
*.a | ||
**/_build | ||
**/_build | ||
clang-tidy-output.{txt,json} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[submodule "sdk-extensions"] | ||
path = sdk-extensions | ||
url = ../sdk-extensions.git | ||
branch = master | ||
branch = master |
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
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 |
---|---|---|
|
@@ -13,26 +13,28 @@ include(DefaultBuildType) | |
include(VcpkgEnv) | ||
|
||
# ==== Project Name ==== | ||
project(ouster-sdk VERSION 0.13.1) | ||
project(ouster-sdk VERSION 0.14.0) | ||
|
||
# generate version header | ||
set(OusterSDK_VERSION_STRING 0.13.1) | ||
set(OusterSDK_VERSION_STRING 0.14.0) | ||
include(VersionGen) | ||
|
||
# ==== Options ==== | ||
option(CMAKE_POSITION_INDEPENDENT_CODE "Build position independent code." ON) | ||
option(BUILD_SHARED_LIBS "Build shared libraries." OFF) | ||
option(BUILD_PCAP "Build pcap utils." ON) | ||
option(BUILD_OSF "Build Ouster OSF library." ON) | ||
option(BUILD_VIZ "Build Ouster visualizer." ON) | ||
option(BUILD_PYTHON_MODULE "Build python module (should not use this except in special instances)." OFF) | ||
option(BUILD_TESTING "Build tests" OFF) | ||
option(BUILD_EXAMPLES "Build C++ examples" OFF) | ||
option(OUSTER_USE_EIGEN_MAX_ALIGN_BYTES_32 "Eigen max aligned bytes." ON) | ||
option(OUSTER_USE_EIGEN_MAX_ALIGN_BYTES_32 "Eigen max aligned bytes." OFF) | ||
option(BUILD_SHARED_LIBRARY "Build shared Library." OFF) | ||
option(BUILD_DEBIAN_FOR_GITHUB "Build debian for github ci" OFF) | ||
|
||
# when building as a top-level project | ||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) | ||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
set(OUSTER_TOP_LEVEL ON) | ||
if(NOT DEFINED CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
@@ -43,13 +45,15 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) | |
endif() | ||
|
||
if(MSVC) | ||
add_compile_options(/W2) | ||
add_compile_options(/W2 /bigobj /Zf) | ||
add_compile_definitions(NOMINMAX _USE_MATH_DEFINES WIN32_LEAN_AND_MEAN) | ||
else() | ||
add_compile_options(-Wall -Wextra) | ||
endif() | ||
|
||
include(CTest) | ||
else() | ||
set(OUSTER_TOP_LEVEL OFF) | ||
endif() | ||
|
||
# === Subdirectories === | ||
|
@@ -69,16 +73,26 @@ endif() | |
|
||
if(BUILD_VIZ) | ||
add_subdirectory(ouster_viz) | ||
add_subdirectory(thirdparty/glad) | ||
endif() | ||
|
||
if(BUILD_EXAMPLES) | ||
add_subdirectory(examples) | ||
endif() | ||
|
||
if(BUILD_SHARED_LIBRARY) | ||
add_subdirectory(ouster_library) | ||
endif() | ||
|
||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) | ||
add_subdirectory(tests) | ||
endif() | ||
|
||
if(BUILD_PYTHON_MODULE) | ||
set(OUSTER_SDK_PATH "${CMAKE_CURRENT_LIST_DIR}" CACHE STRING "SDK source directory") | ||
add_subdirectory(python) | ||
endif() | ||
|
||
# ==== Packaging ==== | ||
set(CPACK_PACKAGE_CONTACT "[email protected]") | ||
set(CPACK_PACKAGE_VENDOR "Ouster") | ||
|
@@ -88,18 +102,30 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") | |
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.rst") | ||
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/ouster") | ||
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_PROCESSOR}) | ||
set(CPACK_PACKAGE_NAME ouster_sdk) | ||
set(CPACK_GENERATOR "DEB;TGZ") | ||
|
||
if(BUILD_DEBIAN_FOR_GITHUB) | ||
set(CPACK_DEBIAN_PACKAGE_NAME ouster-sdk) | ||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) | ||
set(CPACK_DEBIAN_PACKAGE_DEPENDS | ||
"libeigen3-dev, libtins-dev, libglfw3-dev, libpng-dev, libflatbuffers-dev") | ||
endif() | ||
|
||
if(OUSTER_LIBRARY_NAME) | ||
set(CPACK_PACKAGE_NAME "${OUSTER_LIBRARY_NAME}") | ||
else() | ||
set(CPACK_PACKAGE_NAME "ouster-sdk") | ||
endif() | ||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CMAKE_BUILD_TYPE}-${CPACK_PACKAGE_VERSION}-${CMAKE_HOST_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}-${CMAKE_SYSTEM_PROCESSOR}") | ||
|
||
set(CPACK_GENERATOR "TGZ;ZIP") | ||
if(BUILD_DEBIAN_FOR_GITHUB) | ||
set(CPACK_GENERATOR "DEB;${CPACK_GENERATOR}") | ||
endif() | ||
|
||
# source packages | ||
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP") | ||
set(CPACK_SOURCE_IGNORE_FILES /.git /dist) | ||
|
||
# deb options | ||
set(CPACK_DEBIAN_PACKAGE_NAME ouster-sdk) | ||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) | ||
set(CPACK_DEBIAN_PACKAGE_DEPENDS | ||
"libjsoncpp-dev, libeigen3-dev, libtins-dev, libglfw3-dev, libglew-dev, libspdlog-dev, libpng-dev, libflatbuffers-dev") | ||
include(CPack) | ||
|
||
# ==== Install ==== | ||
|
@@ -117,14 +143,22 @@ install(EXPORT ouster-sdk-targets | |
configure_file(cmake/OusterSDKConfig.cmake.in OusterSDKConfig.cmake @ONLY) | ||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/OusterSDKConfig.cmake" | ||
"${CMAKE_CURRENT_BINARY_DIR}/OusterSDKConfigVersion.cmake" | ||
"cmake/Coverage.cmake" | ||
"cmake/VcpkgEnv.cmake" | ||
DESTINATION lib/cmake/OusterSDK) | ||
if(BUILD_PCAP) | ||
# Install the findpcap cmake file for install targets. | ||
# For some reason it only works if you rename it to PcapConfig.cmake | ||
install(FILES "cmake/FindPcap.cmake" | ||
DESTINATION lib/cmake/OusterSDK | ||
RENAME PcapConfig.cmake) | ||
endif() | ||
install(FILES "cmake/FindEigen3.cmake" | ||
DESTINATION lib/cmake/OusterSDK) | ||
install(FILES "cmake/Findlibtins.cmake" | ||
DESTINATION lib/cmake/OusterSDK) | ||
install(FILES "cmake/FindCURL.cmake" | ||
DESTINATION lib/cmake/OusterSDK) | ||
install(FILES "cmake/Findglfw3.cmake" | ||
DESTINATION lib/cmake/OusterSDK) | ||
install(FILES "cmake/FindPcap.cmake" | ||
DESTINATION lib/cmake/OusterSDK) | ||
install(FILES "cmake/FindFlatbuffers.cmake" | ||
DESTINATION lib/cmake/OusterSDK) | ||
|
||
|
||
install(FILES LICENSE LICENSE-bin | ||
DESTINATION share) |
Oops, something went wrong.