aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Mrzyglod <danielx.t.mrzyglod@intel.com>2016-12-06 15:13:18 +0100
committerKarol Latecki <karolx.latecki@intel.com>2017-01-24 13:15:02 +0100
commita18f8552ebe36f965c7bab161a329430acfe5cb8 (patch)
tree817d0578b4d92f8c78b6885a33a752b4316261d2
parent116a24859ada50e7904092fd4f886493c322a8c7 (diff)
tldk_test: fix add define for older gcc
In CentOS 7 __STDC_FORMAT_MACROS define was missing. Change-Id: I4d2a6d4984edb8be3c15b6ae9d6db7a5b578d1a4 Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
-rw-r--r--test/gtest/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/gtest/Makefile b/test/gtest/Makefile
index ea50999..4d8a42c 100644
--- a/test/gtest/Makefile
+++ b/test/gtest/Makefile
@@ -76,6 +76,11 @@ SRCS-y += test_tle_udp_event.cpp
SRCS-y += test_tle_udp_stream.cpp
CXXFLAGS += -std=c++11
+
+ifeq ($(shell test $(GCC_VERSION) -lt 50 && echo 1), 1)
+CXXFLAGS += -D __STDC_FORMAT_MACROS
+endif
+
CXXFLAGS += -I$(GTEST_DIR)/include
CXXFLAGS += -I$(GMOCK_DIR)/include
CXXFLAGS += -I$(RTE_OUTPUT)/include
@@ -99,6 +104,11 @@ APP = gtest-rfc
# all source are stored in SRCS-y
CFLAGS += -O3
+
+ifeq ($(shell test $(GCC_VERSION) -lt 50 && echo 1), 1)
+CFLAGS += -D __STDC_FORMAT_MACROS
+endif
+
CFLAGS += $(WERROR_FLAGS)
LDLIBS += gtest-rfc.o