From 0e2d00214eda754f86207a861a442f16754124bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Lei=C3=9Fa?= Date: Thu, 30 Nov 2023 11:29:35 +0100 Subject: [PATCH] compile fix and switching to old clang-format --- .pre-commit-config.yaml | 8 ++------ examples/CMakeLists.txt | 6 +++++- examples/hello.cpp | 4 +++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6d7a224f37..d992532b05 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,11 +6,7 @@ repos: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - - repo: https://github.com/pocc/pre-commit-hooks - rev: v1.3.5 + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v17.0.6 hooks: - id: clang-format - #- id: clang-tidy - #- id: cppcheck - #- id: cpplint - #- id: include-what-you-use diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index d456ebf1d2..0e89054ac2 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,5 +1,9 @@ add_executable(hello hello.cpp) -target_link_libraries(hello libthorin) +target_link_libraries(hello + PRIVATE + libthorin + thorin_interface_mem +) set_target_properties(hello PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/examples") add_dependencies(hello thorin_compile thorin_core) install(TARGETS hello EXPORT thorin-targets) diff --git a/examples/hello.cpp b/examples/hello.cpp index 14e080a077..51870900ad 100644 --- a/examples/hello.cpp +++ b/examples/hello.cpp @@ -1,11 +1,13 @@ #include #include + #include #include -#include #include +#include + using namespace thorin; using namespace thorin::plug;