-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #303 from ethereum/cmake_vmtester_helper
cmake: Add helper for adding vmtester based VM test
- Loading branch information
Showing
6 changed files
with
36 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/evmcTargets.cmake") | ||
include(${CMAKE_CURRENT_LIST_DIR}/evmcTargets.cmake) | ||
check_required_components(evmc) | ||
|
||
include(${CMAKE_CURRENT_LIST_DIR}/EVMC.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# EVMC: Ethereum Client-VM Connector API. | ||
# Copyright 2019 The EVMC Authors. | ||
# Licensed under the Apache License, Version 2.0. | ||
|
||
|
||
# Adds a CMake test to check the given EVMC VM implementation with the evmc-vmtester tool. | ||
# | ||
# evmc_add_vm_test(NAME <test_name> TARGET <vm>) | ||
# - NAME argument specifies the name of the added test, | ||
# - TARGET argument specifies the CMake target being a shared library with EVMC VM implementation. | ||
function(evmc_add_vm_test) | ||
if(NOT TARGET evmc::evmc-vmtester) | ||
message(FATAL_ERROR "The evmc-vmtester has not been installed with this EVMC package") | ||
endif() | ||
|
||
cmake_parse_arguments("" "" NAME;TARGET "" ${ARGN}) | ||
add_test(NAME ${_NAME} COMMAND $<TARGET_FILE:evmc::evmc-vmtester> $<TARGET_FILE:${_TARGET}>) | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters