JS Port
Hi,
I would like to update my pretty outdated JS port. In order to (out of the box) run the tests with nodejs it would be great if you could include ${CMAKE_CROSSCOMPILING_EMULATOR}
into CMakeLists as such:
# unit tests
set(unit_tests
test_inversion
)
foreach(app ${unit_tests})
add_executable(${app} ${app}.c)
add_test(${app} ${CMAKE_CROSSCOMPILING_EMULATOR} ${CMAKE_CURRENT_BINARY_DIR}/${app})
target_include_directories(${app} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${lmfit_SOURCE_DIR}/lib)
target_link_libraries(${app} ${lmfit_LIBRARY})
endforeach()
# functional tests
add_test(curve1 ${CMAKE_CROSSCOMPILING_EMULATOR} ${CMAKE_CURRENT_BINARY_DIR}/../demo/curve1)
add_test(surface1 ${CMAKE_CROSSCOMPILING_EMULATOR} ${CMAKE_CURRENT_BINARY_DIR}/../demo/surface1)
It does not change anything in your nativ build but if I pass emcmake cmake .. -DCMAKE_CROSSCOMPILING_EMULATOR=node
it will run all tests in node automatically.
Thank you Jan
Edited by jan.vaillant