Skip to content

Commit

Permalink
Add t8n version with cable
Browse files Browse the repository at this point in the history
  • Loading branch information
rodiazet committed Apr 14, 2023
1 parent 31fd534 commit 68e8278
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmake/cable/buildinfo/buildinfo.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "buildinfo.h"

const struct buildinfo* @FUNCTION_NAME@()
const struct buildinfo* @FUNCTION_NAME@(void)
{
static const struct buildinfo buildinfo = {
.project_name = "@PROJECT_NAME@",
Expand Down
2 changes: 1 addition & 1 deletion cmake/cable/buildinfo/buildinfo.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct buildinfo
const char* build_type;
};

const struct buildinfo* @FUNCTION_NAME@();
const struct buildinfo* @FUNCTION_NAME@(void);

#ifdef __cplusplus
}
Expand Down
11 changes: 5 additions & 6 deletions test/t8n/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
# Copyright 2022 The evmone Authors.
# SPDX-License-Identifier: Apache-2.0

include(CableBuildInfo)

hunter_add_package(nlohmann_json)
find_package(nlohmann_json CONFIG REQUIRED)

add_executable(evmone-t8n)
target_link_libraries(evmone-t8n PRIVATE evmone::statetestutils nlohmann_json::nlohmann_json)
target_link_libraries(evmone-t8n PRIVATE evmc::evmc evmone)
target_include_directories(evmone-t8n PRIVATE ${evmone_private_include_dir})
cable_add_buildinfo_library(PROJECT_NAME t8n)
target_include_directories(evmone-t8n PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
target_sources(evmone-t8n PRIVATE t8n.cpp)

# Provide the project version to selected source files.
set_source_files_properties(
t8n.cpp
PROPERTIES COMPILE_DEFINITIONS PROJECT_VERSION="${PROJECT_VERSION}"
)
3 changes: 2 additions & 1 deletion test/t8n/t8n.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "../state/rlp.hpp"
#include "../statetest/statetest.hpp"
#include <evmone/evmone.h>
#include <evmone_t8n/version.h>
#include <nlohmann/json.hpp>
#include <filesystem>
#include <fstream>
Expand Down Expand Up @@ -39,7 +40,7 @@ int main(int argc, const char* argv[])

if (arg == "-v")
{
std::cout << "evmone-t8n " PROJECT_VERSION "\n";
std::cout << "evmone-t8n " EVMONE_T8N_VERSION "\n";
return 0;
}
if (arg == "--state.fork" && ++i < argc)
Expand Down

0 comments on commit 68e8278

Please sign in to comment.