From b05599fdb8fa3fea2663021ab5276f89c2a78229 Mon Sep 17 00:00:00 2001 From: mikeller Date: Mon, 1 Jun 2020 15:30:18 +1200 Subject: [PATCH] Added Makefile target to dump compiler versions used to build tests. --- Makefile | 4 ++++ src/test/Makefile | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/Makefile b/Makefile index cce51d3a2..015fd8c16 100644 --- a/Makefile +++ b/Makefile @@ -690,6 +690,10 @@ test junittest test-all test-representative: test_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_%: $(V0) cd src/test && $(MAKE) $@ diff --git a/src/test/Makefile b/src/test/Makefile index f7fa864ee..51120398d 100644 --- a/src/test/Makefile +++ b/src/test/Makefile @@ -437,6 +437,9 @@ COMMON_FLAGS = \ -isystem $(GTEST_DIR)/inc \ -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) COMMON_FLAGS += -fblocks 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:" @$(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 : rm -rf $(OBJECT_DIR) -- 2.11.4.GIT