2019-02-02 04:10:36 +00:00
|
|
|
cmake_minimum_required (VERSION 2.6)
|
|
|
|
project (WasmerCApiTests)
|
|
|
|
|
|
|
|
add_executable(test-instantiate test-instantiate.c)
|
2019-02-02 23:43:59 +00:00
|
|
|
add_executable(test-import-function test-import-function.c)
|
2019-02-05 03:46:47 +00:00
|
|
|
add_executable(test-memory test-memory.c)
|
2019-02-02 04:10:36 +00:00
|
|
|
|
2019-02-03 18:14:14 +00:00
|
|
|
find_library(
|
|
|
|
WASMER_LIB NAMES libwasmer_runtime_c_api.dylib libwasmer_runtime_c_api.so libwasmer_runtime_c_api.dll
|
|
|
|
PATHS ${CMAKE_SOURCE_DIR}/../../../target/debug/
|
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT WASMER_LIB)
|
|
|
|
message(FATAL_ERROR "wasmer library not found")
|
|
|
|
endif()
|
2019-02-02 04:10:36 +00:00
|
|
|
|
2019-02-03 18:14:14 +00:00
|
|
|
target_link_libraries(test-instantiate
|
|
|
|
general ${WASMER_LIB})
|
2019-02-02 23:43:59 +00:00
|
|
|
target_link_libraries(test-import-function
|
2019-02-03 18:14:14 +00:00
|
|
|
general ${WASMER_LIB})
|
2019-02-05 03:46:47 +00:00
|
|
|
target_link_libraries(test-memory
|
|
|
|
general ${WASMER_LIB})
|
2019-02-02 23:43:59 +00:00
|
|
|
|
2019-02-02 04:10:36 +00:00
|
|
|
enable_testing()
|
|
|
|
add_test(test-instantiate test-instantiate)
|
2019-02-02 23:43:59 +00:00
|
|
|
add_test(test-import-function test-import-function)
|
2019-02-05 03:46:47 +00:00
|
|
|
add_test(test-memory test-memory)
|
2019-02-02 04:10:36 +00:00
|
|
|
|