2018-06-08 10:44:33 +00:00
|
|
|
# EVMC: Ethereum Client-VM Connector API.
|
2019-03-13 18:31:50 +00:00
|
|
|
# Copyright 2019 The EVMC Authors.
|
|
|
|
# Licensed under the Apache License, Version 2.0.
|
|
|
|
|
2019-04-02 10:59:49 +00:00
|
|
|
include(GoogleTest)
|
|
|
|
|
2019-03-13 18:31:50 +00:00
|
|
|
add_library(loader-mocked STATIC ${PROJECT_SOURCE_DIR}/lib/loader/loader.c)
|
|
|
|
target_link_libraries(loader-mocked PRIVATE evmc)
|
|
|
|
target_compile_definitions(loader-mocked PRIVATE EVMC_LOADER_MOCK=1)
|
2018-06-08 10:44:33 +00:00
|
|
|
|
|
|
|
add_executable(
|
2019-04-02 10:36:08 +00:00
|
|
|
evmc-unittests
|
2019-03-13 18:31:50 +00:00
|
|
|
loader_mock.h
|
2018-11-26 15:52:36 +00:00
|
|
|
test_cpp.cpp
|
2018-09-08 14:08:37 +00:00
|
|
|
test_helpers.cpp
|
2018-06-08 10:44:33 +00:00
|
|
|
test_instructions.cpp
|
2018-07-04 23:10:33 +00:00
|
|
|
test_loader.cpp
|
2018-06-08 10:44:33 +00:00
|
|
|
)
|
|
|
|
|
2019-04-02 10:36:08 +00:00
|
|
|
target_link_libraries(evmc-unittests PRIVATE loader-mocked evmc-example-vm-static evmc-example-host instructions GTest::gtest GTest::main)
|
|
|
|
set_target_properties(evmc-unittests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)
|
2019-04-02 10:59:49 +00:00
|
|
|
|
|
|
|
gtest_add_tests(TARGET evmc-unittests TEST_PREFIX unittests/)
|