mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 05:31:32 +00:00
Call cargo build during make test to build C API lib
This commit is contained in:
1
Makefile
1
Makefile
@ -40,6 +40,7 @@ test:
|
|||||||
# cargo test --all -- --test-threads=1 $(runargs)
|
# cargo test --all -- --test-threads=1 $(runargs)
|
||||||
# cargo test --all --exclude wasmer-emscripten -- --test-threads=1 $(runargs)
|
# cargo test --all --exclude wasmer-emscripten -- --test-threads=1 $(runargs)
|
||||||
cargo test -p wasmer-spectests -- --test-threads=1 $(runargs)
|
cargo test -p wasmer-spectests -- --test-threads=1 $(runargs)
|
||||||
|
cargo build -p wasmer-runtime-c-api
|
||||||
cargo test -p wasmer-runtime-c-api -- --nocapture
|
cargo test -p wasmer-runtime-c-api -- --nocapture
|
||||||
|
|
||||||
release:
|
release:
|
||||||
|
@ -4,21 +4,6 @@ project (WasmerCApiTests)
|
|||||||
add_executable(test-instantiate test-instantiate.c)
|
add_executable(test-instantiate test-instantiate.c)
|
||||||
add_executable(test-import-function test-import-function.c)
|
add_executable(test-import-function test-import-function.c)
|
||||||
|
|
||||||
include(ExternalProject)
|
|
||||||
set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/rust-build)
|
|
||||||
ExternalProject_Add(
|
|
||||||
wasmer-runtime-c-api
|
|
||||||
DOWNLOAD_COMMAND ""
|
|
||||||
CONFIGURE_COMMAND ""
|
|
||||||
BUILD_COMMAND cargo build
|
|
||||||
COMMAND cargo build
|
|
||||||
BINARY_DIR "${CMAKE_SOURCE_DIR}/../"
|
|
||||||
INSTALL_COMMAND ""
|
|
||||||
LOG_BUILD ON)
|
|
||||||
add_dependencies(test-instantiate wasmer-runtime-c-api)
|
|
||||||
add_dependencies(test-import-function wasmer-runtime-c-api)
|
|
||||||
|
|
||||||
|
|
||||||
find_library(
|
find_library(
|
||||||
WASMER_LIB NAMES libwasmer_runtime_c_api.dylib libwasmer_runtime_c_api.so libwasmer_runtime_c_api.dll
|
WASMER_LIB NAMES libwasmer_runtime_c_api.dylib libwasmer_runtime_c_api.so libwasmer_runtime_c_api.dll
|
||||||
PATHS ${CMAKE_SOURCE_DIR}/../../../target/debug/
|
PATHS ${CMAKE_SOURCE_DIR}/../../../target/debug/
|
||||||
|
Reference in New Issue
Block a user