2018-06-08 12:44:33 +02:00
|
|
|
# EVMC: Ethereum Client-VM Connector API.
|
2019-04-24 16:12:13 +02:00
|
|
|
# Copyright 2018-2019 The EVMC Authors.
|
2019-03-13 19:31:50 +01:00
|
|
|
# Licensed under the Apache License, Version 2.0.
|
|
|
|
|
2019-04-02 12:59:49 +02:00
|
|
|
include(GoogleTest)
|
|
|
|
|
2019-03-13 19:31:50 +01: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 12:44:33 +02:00
|
|
|
|
|
|
|
add_executable(
|
2019-04-02 12:36:08 +02:00
|
|
|
evmc-unittests
|
2019-03-13 19:31:50 +01:00
|
|
|
loader_mock.h
|
2018-11-26 16:52:36 +01:00
|
|
|
test_cpp.cpp
|
2018-09-08 16:08:37 +02:00
|
|
|
test_helpers.cpp
|
2018-06-08 12:44:33 +02:00
|
|
|
test_instructions.cpp
|
2018-07-05 01:10:33 +02:00
|
|
|
test_loader.cpp
|
2018-06-08 12:44:33 +02:00
|
|
|
)
|
|
|
|
|
2019-04-02 12:36:08 +02: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 12:59:49 +02:00
|
|
|
|
2019-05-15 14:45:10 +02:00
|
|
|
gtest_add_tests(TARGET evmc-unittests TEST_PREFIX ${PROJECT_NAME}/unittests/)
|