Skip to content

Commit

Permalink
Included tl_expected (#185)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
(cherry picked from commit 2a5bfd5)
  • Loading branch information
ahcorde authored and mergify[bot] committed Feb 6, 2024
1 parent d42faa7 commit 0c3e0d7
Show file tree
Hide file tree
Showing 3 changed files with 2,366 additions and 5 deletions.
33 changes: 30 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ find_package(rcutils REQUIRED)
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 11)
endif()
# TODO (ahcorde): Remove tl_expected when CXX 20 standard is available
# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
Expand Down Expand Up @@ -49,14 +50,40 @@ ament_export_dependencies(rcutils)

if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
find_package(ament_lint_auto REQUIRED)

find_package(ament_cmake_copyright REQUIRED)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_flake8 REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_pep257 REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
find_package(ament_cmake_xmllint REQUIRED)

set(
_linter_excludes
include/rcpputils/tl_expected/expected.hpp
)

ament_copyright(EXCLUDE ${_linter_excludes})
ament_cppcheck(
EXCLUDE ${_linter_excludes}
LANGUAGE c++
)
ament_cpplint(EXCLUDE ${_linter_excludes})
ament_flake8(EXCLUDE ${_linter_excludes})
ament_lint_cmake()
ament_pep257(EXCLUDE ${_linter_excludes})
ament_uncrustify(
EXCLUDE ${_linter_excludes}
LANGUAGE c++
)
ament_xmllint()

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wthread-safety -Werror)
endif()

ament_lint_auto_find_test_dependencies()

ament_add_gtest(test_asserts_ndebug test/test_asserts.cpp)
target_link_libraries(test_asserts_ndebug ${PROJECT_NAME})

Expand Down
Loading

0 comments on commit 0c3e0d7

Please sign in to comment.