diff --git a/Makefile b/Makefile index 6adbf765ee..6480286d2d 100644 --- a/Makefile +++ b/Makefile @@ -251,9 +251,7 @@ testbuild: # Unittest targets. Builds and runs the host-level # unit tests. .PHONY: tests -tests: - $(Q) $(MAKE) generateuorbtopicheaders - $(Q) (cd $(PX4_BASE)/unittests && $(MAKE) unittests) +tests: generateuorbtopicheaders $(Q) (mkdir -p $(PX4_BASE)/unittests/build && cd $(PX4_BASE)/unittests/build && cmake .. && $(MAKE) unittests) #