From 6537b38c75a98ae076d5bb3f8a5610bb6aa6bd6b Mon Sep 17 00:00:00 2001 From: Daniel Thornburgh Date: Fri, 4 Nov 2022 10:11:12 -0700 Subject: [PATCH] Add test. --- CMakeLists.txt | 8 ++++++++ test.cmake | 1 + 2 files changed, 9 insertions(+) create mode 100644 test.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c95946..cb62bc6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,3 +3,11 @@ set(LLVM_MOS_PLATFORM sim) find_package(llvm-mos-sdk REQUIRED) project(smoke-test) add_executable(hello hello.c) + +find_program(SIM mos-sim REQUIRED) +add_test(NAME test + COMMAND ${CMAKE_COMMAND} + -DSIM=${SIM} + -DHELLO=$ + -P test.cmake +) diff --git a/test.cmake b/test.cmake new file mode 100644 index 0000000..5262888 --- /dev/null +++ b/test.cmake @@ -0,0 +1 @@ +find_program(SIM mos-sim REQUIRED)