1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 09:16:07 +03:00

Merge pull request #4046 from martinbudden/bf_test_makefile

Unit test makefile fix
This commit is contained in:
Martin Budden 2017-09-02 09:47:49 +01:00 committed by GitHub
commit b622e8b0fe

View file

@ -268,6 +268,9 @@ USER_INCLUDE_DIR = $(USER_DIR)
OBJECT_DIR = ../../obj/test
# Determine the OS
UNAME := $(shell uname -s)
# Use clang/clang++ by default
CC := clang
CXX := clang++
@ -278,12 +281,15 @@ COMMON_FLAGS = \
-Wextra \
-Werror \
-ggdb3 \
-pthread \
-O0 \
-DUNIT_TEST \
-isystem $(GTEST_DIR)/inc \
-MMD -MP
ifneq ($(UNAME), Darwin)
COMMON_FLAGS += -pthread
endif
# Flags passed to the C compiler.
C_FLAGS = $(COMMON_FLAGS) \
-std=gnu99
@ -298,8 +304,7 @@ COVERAGE_FLAGS := --coverage
C_FLAGS += $(COVERAGE_FLAGS)
CXX_FLAGS += $(COVERAGE_FLAGS)
# Determine the OS and set up the parameter group linker flags accordingly
UNAME := $(shell uname -s)
# Set up the parameter group linker flags according to OS
ifeq ($(UNAME), Darwin)
PG_FLAGS = -Wl,-map,$(OBJECT_DIR)/$@.map
else