Skip to content

Commit

Permalink
Add project version printing (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodiazet authored Feb 8, 2023
1 parent ca7028a commit 4ac0ec0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions test/t8n/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ 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_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}"
)
2 changes: 1 addition & 1 deletion test/t8n/t8n.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main(int argc, const char* argv[])

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

0 comments on commit 4ac0ec0

Please sign in to comment.