cmake:vec_cc_test: Downgrade the emulator check into a warning

Do not block the build with the emulator check. renode_ and qemu_ test
targets may be bypassed if the emulators do not exists.

Fix b/195667830

Change-Id: I029ba1df154b87ee0257c6014a425873a0773442
diff --git a/cmake/vec_cc_test.cmake b/cmake/vec_cc_test.cmake
index a76d0d2..7c36331 100644
--- a/cmake/vec_cc_test.cmake
+++ b/cmake/vec_cc_test.cmake
@@ -33,13 +33,28 @@
   set(_TIMEOUT ${_RULE_TIMEOUT})
 endif()
 
-find_program(QEMU_RV32 qemu-system-riscv32 HINTS $ENV{OUT}/host/qemu REQUIRED)
-find_program(RENODE_EXE Renode.exe HINTS $ENV{OUT}/host/renode REQUIRED)
-add_test(NAME "qemu_${_RULE_NAME}"
-         COMMAND test_runner.py qemu $<TARGET_FILE:${_RULE_NAME}.elf> --qemu-path ${QEMU_RV32} --timeout=${_TIMEOUT})
-add_test(NAME "renode_${_RULE_NAME}"
-         COMMAND test_runner.py renode $<TARGET_FILE:${_RULE_NAME}.elf> --renode-path ${RENODE_EXE})
-set_tests_properties("renode_${_RULE_NAME}" PROPERTIES TIMEOUT ${_TIMEOUT})
-set_tests_properties("qemu_${_RULE_NAME}" PROPERTIES TIMEOUT ${_TIMEOUT})
-
+find_program(QEMU_RV32 qemu-system-riscv32 HINTS $ENV{OUT}/host/qemu)
+if(QEMU_RV32)
+  add_test(
+    NAME
+      "qemu_${_RULE_NAME}"
+    COMMAND
+      test_runner.py qemu $<TARGET_FILE:${_RULE_NAME}.elf> --qemu-path ${QEMU_RV32} --timeout=${_TIMEOUT}
+  )
+  set_tests_properties("qemu_${_RULE_NAME}" PROPERTIES TIMEOUT ${_TIMEOUT})
+else()
+  message(WARNING "qemu-system-riscv32 doesn't exist. Make sure you build qemu first and start a clean build to enable the qemu test")
+endif()
+find_program(RENODE_EXE Renode.exe HINTS $ENV{OUT}/host/renode)
+if(RENODE_EXE)
+  add_test(
+    NAME
+      "renode_${_RULE_NAME}"
+    COMMAND
+      test_runner.py renode $<TARGET_FILE:${_RULE_NAME}.elf> --renode-path ${RENODE_EXE}
+  )
+  set_tests_properties("renode_${_RULE_NAME}" PROPERTIES TIMEOUT ${_TIMEOUT})
+else()
+  message(WARNING "Renode.exe doesn't exist. Make sure you build renode first and start a clean build to enable the renode test")
+endif()
 endfunction()