Skip to content
Merged

V6 #103

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
Checks: "-header-filter=.*,readability-identifier-naming,modernize-*,performance-*,bugprone-*,-modernize-use-trailing-return-type,-checks=-*"
Checks: >
-*,
readability-identifier-naming,
modernize-*,
performance-*,
bugprone-*,
-bugprone-exception-escape,
clang-diagnostic-dangling*,
-modernize-use-trailing-return-type
WarningsAsErrors: "*"
UseColor: true
CheckOptions:
Expand Down
232 changes: 0 additions & 232 deletions llvm.sh

This file was deleted.

2 changes: 2 additions & 0 deletions v5/include/libhal-util/map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include <algorithm>

#include "math.hpp"

/**
* @defgroup Map Map
*
Expand Down
3 changes: 3 additions & 0 deletions v6/.clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CompileFlags:
CompilationDatabase: .
BuiltinHeaders: QueryDriver
78 changes: 78 additions & 0 deletions v6/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Copyright 2024 - 2025 Khalil Estell and the libhal contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 4.0)

# TODO(kammce): remove line below
set(LIBHAL_ENABLE_CLANG_TIDY OFF)

project(libhal-util LANGUAGES CXX)

# libhal cmake utilities from libhal-cmake-util
# Source: https://github.com/libhal/libhal-cmake-util
find_package(LibhalCMakeUtil REQUIRED)

find_package(libhal REQUIRED)

libhal_project_init()
libhal_add_library(util
MODULES
modules/hal.util.cppm
modules/as_bytes.cppm
modules/bit.cppm
modules/can.cppm
modules/comparison.cppm
modules/enum.cppm
modules/i2c.cppm
modules/map.cppm
modules/math.cppm
modules/overflow_counter.cppm
modules/serial.cppm
modules/spi.cppm
modules/steady_clock.cppm
modules/to_array.cppm
modules/units.cppm
)

target_link_libraries(util
PUBLIC
libhal::libhal
)

libhal_apply_compile_options(util)
libhal_install_library(util NAMESPACE libhal PACKAGE_NAME libhal-util)
libhal_add_tests(util
TEST_NAMES
main
as_bytes
bit
bit_functions
can
enum
i2c
map
math
overflow_counter
serial
spi
steady_clock
to_array
units
MODULES
tests/util.cppm
LINK_LIBRARIES
libhal::libhal
PACKAGES
libhal
)
Loading
Loading