wasmer/lib/runtime-c-api/tests/CMakeLists.txt

49 lines
1.5 KiB
CMake
Raw Normal View History

2019-02-01 22:10:36 -06:00
cmake_minimum_required (VERSION 2.6)
project (WasmerCApiTests)
2019-02-13 20:02:11 -06:00
add_executable(test-exports test-exports.c)
2019-02-09 17:39:15 -06:00
add_executable(test-globals test-globals.c)
2019-02-01 22:10:36 -06:00
add_executable(test-instantiate test-instantiate.c)
add_executable(test-import-function test-import-function.c)
2019-02-04 21:46:47 -06:00
add_executable(test-memory test-memory.c)
2019-02-15 19:47:00 -06:00
add_executable(test-module test-module.c)
2019-02-05 00:01:01 -06:00
add_executable(test-validate test-validate.c)
2019-02-09 13:37:07 -06:00
add_executable(test-tables test-tables.c)
2019-02-01 22:10:36 -06: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-01 22:10:36 -06:00
2019-02-13 20:02:11 -06:00
target_link_libraries(test-exports
general ${WASMER_LIB})
2019-02-09 17:39:15 -06:00
target_link_libraries(test-globals
general ${WASMER_LIB})
target_link_libraries(test-instantiate
general ${WASMER_LIB})
target_link_libraries(test-import-function
general ${WASMER_LIB})
2019-02-04 21:46:47 -06:00
target_link_libraries(test-memory
general ${WASMER_LIB})
2019-02-15 19:47:00 -06:00
target_link_libraries(test-module
general ${WASMER_LIB})
2019-02-05 00:01:01 -06:00
target_link_libraries(test-validate
general ${WASMER_LIB})
2019-02-09 13:37:07 -06:00
target_link_libraries(test-tables
general ${WASMER_LIB})
2019-02-01 22:10:36 -06:00
enable_testing()
2019-02-13 20:02:11 -06:00
add_test(test-exports test-exports)
2019-02-09 17:39:15 -06:00
add_test(test-globals test-globals)
2019-02-01 22:10:36 -06:00
add_test(test-instantiate test-instantiate)
add_test(test-import-function test-import-function)
2019-02-04 21:46:47 -06:00
add_test(test-memory test-memory)
2019-02-15 19:47:00 -06:00
add_test(test-module test-module)
2019-02-05 00:01:01 -06:00
add_test(test-validate test-validate)
2019-02-09 13:37:07 -06:00
add_test(test-tables test-tables)
2019-02-01 22:10:36 -06:00