Skip to content

Commit

Permalink
Pure c files moved to third_party dir (#2348)
Browse files Browse the repository at this point in the history
* Moved keccak to third_party dir

* Adding third_party dir to included in clang-tidy script

---------

Co-authored-by: kamilsa <[email protected]>
  • Loading branch information
ErakhtinB and kamilsa authored Jan 23, 2025
1 parent f004e3a commit 565f2fe
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,12 @@ include(cmake/install.cmake)
include_directories($<INSTALL_INTERFACE:${CMAKE_INSTALL_FULL_INCLUDEDIR}/kagome>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/core>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/core> # for generated file
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/third_party>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/third_party> # for generated file
)

add_subdirectory(core)
add_subdirectory(third_party)

kagome_install_setup(
HEADER_DIRS
Expand Down
1 change: 0 additions & 1 deletion core/crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,5 @@ kagome_install(elliptic_curves)
add_subdirectory(bip39)
add_subdirectory(blake2)
add_subdirectory(key_store)
add_subdirectory(keccak)
add_subdirectory(sha)
add_subdirectory(twox)
2 changes: 1 addition & 1 deletion core/crypto/hasher/hasher_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

#include "crypto/blake2/blake2b.h"
#include "crypto/blake2/blake2s.h"
#include "crypto/keccak/keccak.h"
#include "crypto/sha/sha256.hpp"
#include "crypto/twox/twox.hpp"
#include "keccak/keccak.h"

namespace kagome::crypto {
using common::Hash128;
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/keccak/keccak.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "common/blob.hpp"
#include "common/buffer.hpp"
#include "crypto/keccak/keccak.h"
#include "keccak/keccak.h"

namespace kagome::crypto {
inline common::Hash256 keccak(common::BufferView buf) {
Expand Down
2 changes: 1 addition & 1 deletion core/primitives/strobe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <boost/assert.hpp>

#include "common/buffer_view.hpp"
#include "crypto/keccak/keccak.h"
#include "keccak/keccak.h"
#include "primitives/math.hpp"

namespace kagome::primitives {
Expand Down
1 change: 1 addition & 0 deletions housekeeping/clang-tidy-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ clang-tidy-diff.py \
-- \
--std=c++20 \
-I core \
-I third_party \
-I $BUILD_DIR/core \
-I $BUILD_DIR/pb/authority_discovery_proto/generated \
-I $BUILD_DIR/pb/light_api_proto/generated \
Expand Down
2 changes: 1 addition & 1 deletion test/core/crypto/keccak/keccak_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <gtest/gtest.h>

#include "common/blob.hpp"
#include "crypto/keccak/keccak.h"
#include "keccak/keccak.h"

TEST(Keccak, Correctness) {
auto keccak_res =
Expand Down
1 change: 1 addition & 0 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_subdirectory(keccak)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <stdio.h>
#include <string.h>

#include "crypto/keccak/keccak.h"
#include "keccak.h"
#include "macro/endianness_utils.hpp"

#define SHA3_ASSERT(x)
Expand Down
File renamed without changes.

0 comments on commit 565f2fe

Please sign in to comment.