diff --git a/cmake/cable/CableBuildInfo.cmake b/cmake/cable/CableBuildInfo.cmake index 73193b444f..75b16a2420 100644 --- a/cmake/cable/CableBuildInfo.cmake +++ b/cmake/cable/CableBuildInfo.cmake @@ -9,6 +9,9 @@ # # CHANGELOG # +# 1.0.1 - 2023-04-19 +# - Fix -Wstrict-prototypes warning in buildinfo source files. +# # 1.0.0 - 2022-02-12 include_guard(GLOBAL) diff --git a/cmake/cable/buildinfo/buildinfo.c.in b/cmake/cable/buildinfo/buildinfo.c.in index c7a146bde9..eddc11aa9d 100644 --- a/cmake/cable/buildinfo/buildinfo.c.in +++ b/cmake/cable/buildinfo/buildinfo.c.in @@ -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@", diff --git a/cmake/cable/buildinfo/buildinfo.h.in b/cmake/cable/buildinfo/buildinfo.h.in index e83153e35c..5b76770e04 100644 --- a/cmake/cable/buildinfo/buildinfo.h.in +++ b/cmake/cable/buildinfo/buildinfo.h.in @@ -26,7 +26,7 @@ struct buildinfo const char* build_type; }; -const struct buildinfo* @FUNCTION_NAME@(); +const struct buildinfo* @FUNCTION_NAME@(void); #ifdef __cplusplus } diff --git a/test/t8n/CMakeLists.txt b/test/t8n/CMakeLists.txt index 206463e7e6..b07261cd0b 100644 --- a/test/t8n/CMakeLists.txt +++ b/test/t8n/CMakeLists.txt @@ -2,16 +2,13 @@ # Copyright 2022 The evmone Authors. # SPDX-License-Identifier: Apache-2.0 +include(CableBuildInfo) +cable_add_buildinfo_library(PROJECT_NAME evmone) + 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_link_libraries(evmone-t8n PRIVATE evmc::evmc evmone evmone-buildinfo) 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}" -) \ No newline at end of file diff --git a/test/t8n/t8n.cpp b/test/t8n/t8n.cpp index 5974fcd997..403ea7c86a 100644 --- a/test/t8n/t8n.cpp +++ b/test/t8n/t8n.cpp @@ -6,6 +6,7 @@ #include "../state/rlp.hpp" #include "../statetest/statetest.hpp" #include +#include #include #include #include @@ -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_VERSION "\n"; return 0; } if (arg == "--state.fork" && ++i < argc)