diff --git a/test/t8n/CMakeLists.txt b/test/t8n/CMakeLists.txt index 206463e7e6..312ca763c1 100644 --- a/test/t8n/CMakeLists.txt +++ b/test/t8n/CMakeLists.txt @@ -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 $) 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..5be7a8a3bb 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_T8N_VERSION "\n"; return 0; } if (arg == "--state.fork" && ++i < argc)