diff --git a/Makefile b/Makefile index cce51d3a21..015fd8c167 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 f7fa864eec..51120398d0 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)