Moved over first rbtree test from koka_bench and integrated Kraken via compiler wrapper script that calls the partial_evaluator / compiler and then emits a wrapper script that runs the resulting wasm via wasmtime.
This commit is contained in:
22
koka_bench/koka/CMakeLists.txt
Normal file
22
koka_bench/koka/CMakeLists.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
set(sources rbtree.kk)
|
||||
|
||||
set(koka koka)
|
||||
|
||||
|
||||
foreach (source IN LISTS sources)
|
||||
get_filename_component(basename "${source}" NAME_WE)
|
||||
set(name "kk-${basename}")
|
||||
|
||||
set(out_dir "${CMAKE_CURRENT_BINARY_DIR}/out/bench")
|
||||
set(out_path "${out_dir}/${name}")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${out_path}
|
||||
COMMAND ${koka} --target=c --stack=128M --outputdir=${out_dir} --buildname=${name} -v -O2 -i$<SHELL_PATH:${CMAKE_CURRENT_SOURCE_DIR}> "${source}"
|
||||
DEPENDS ${source}
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(update-${name} ALL DEPENDS "${out_path}")
|
||||
add_executable(${name}-exe IMPORTED)
|
||||
set_target_properties(${name}-exe PROPERTIES IMPORTED_LOCATION "${out_path}")
|
||||
endforeach ()
|
||||
Reference in New Issue
Block a user