evmc/test/unittests/CMakeLists.txt

33 lines
842 B
CMake
Raw Normal View History

2018-06-08 10:44:33 +00:00
# EVMC: Ethereum Client-VM Connector API.
# Copyright 2018-2019 The EVMC Authors.
# Licensed under the Apache License, Version 2.0.
2019-04-02 10:59:49 +00:00
include(GoogleTest)
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(
evmc-unittests
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
test_loader.cpp
2018-06-08 10:44:33 +00:00
)
target_link_libraries(
evmc-unittests
PRIVATE
loader-mocked
evmc::example-vm-static
evmc::example-precompiles-vm
evmc-example-host
instructions
GTest::gtest_main
)
set_target_properties(evmc-unittests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)
2019-04-02 10:59:49 +00:00
2019-05-15 12:45:10 +00:00
gtest_add_tests(TARGET evmc-unittests TEST_PREFIX ${PROJECT_NAME}/unittests/)