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

Merge pull request #9874 from mikeller/add_test_version_dump

Added Makefile target to dump compiler versions used to build tests.
This commit is contained in:
Michael Keller 2020-06-03 07:06:12 +12:00 committed by GitHub
commit dd261f823e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -690,6 +690,10 @@ test junittest test-all test-representative:
test_help: test_help:
$(V0) cd src/test && $(MAKE) help $(V0) cd src/test && $(MAKE) help
## test_versions : print the compiler versions used for the test suite
test_versions:
$(V0) cd src/test && $(MAKE) versions
## test_% : run test 'test_%' from the test suite ## test_% : run test 'test_%' from the test suite
test_%: test_%:
$(V0) cd src/test && $(MAKE) $@ $(V0) cd src/test && $(MAKE) $@

View file

@ -437,6 +437,9 @@ COMMON_FLAGS = \
-isystem $(GTEST_DIR)/inc \ -isystem $(GTEST_DIR)/inc \
-MMD -MP -MMD -MP
CC_VERSION = $(shell $(CC) -dumpversion)
CXX_VERSION = $(shell $(CXX) -dumpversion)
ifeq ($(shell $(CC) -v 2>&1 | grep -q "clang version" && echo "clang"),clang) ifeq ($(shell $(CC) -v 2>&1 | grep -q "clang version" && echo "clang"),clang)
COMMON_FLAGS += -fblocks COMMON_FLAGS += -fblocks
ifndef CYGWIN ifndef CYGWIN
@ -543,6 +546,10 @@ help what usage: Makefile
@echo "Any of the Unit Test programs (except for target specific unit tests) can be used as goals to build and run:" @echo "Any of the Unit Test programs (except for target specific unit tests) can be used as goals to build and run:"
@$(foreach test, $(TESTS), echo " test_$(test)";) @$(foreach test, $(TESTS), echo " test_$(test)";)
versions:
@echo "C compiler: $(CC): $(CC_VERSION)"
@echo "C++ compiler: $(CXX): $(CXX_VERSION)"
## clean : Cleanup the UnitTest binaries. ## clean : Cleanup the UnitTest binaries.
clean : clean :
rm -rf $(OBJECT_DIR) rm -rf $(OBJECT_DIR)