From be391b4fe52c82150ea46d11eaeee18e9b75a8ca Mon Sep 17 00:00:00 2001
From: Daniel Agar <daniel@agar.ca>
Date: Thu, 21 Apr 2016 17:28:21 -0400
Subject: [PATCH] unittests stop building in tree

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index b46f619f4a..e1e89f9d4d 100644
--- a/Makefile
+++ b/Makefile
@@ -245,7 +245,7 @@ ifeq ($(VECTORCONTROL),1)
 endif
 
 unittest: posix_sitl_default
-	@(cd unittests && cmake -G$(PX4_CMAKE_GENERATOR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) && ctest -j2 --output-on-failure)
+	@(mkdir -p build_unittests && cd build_unittests && cmake -G$(PX4_CMAKE_GENERATOR) ../unittests && $(PX4_MAKE) $(PX4_MAKE_ARGS) && ctest -j2 --output-on-failure)
 
 package_firmware:
 	@zip --junk-paths Firmware.zip `find . -name \*.px4`
-- 
GitLab