From c390ca5ba68d86de8fa4b14bd918f6fc1eb561d6 Mon Sep 17 00:00:00 2001 From: Scott Fennell Date: Thu, 11 Aug 2022 15:10:29 -0500 Subject: [PATCH] replace GTEST_HAS_TR1_TUPLE with -std=c++11 (#1331) --- .github/workflows/test_macos.yml | 7 +------ trick_source/data_products/DPX/test/unit_test/makefile | 2 +- trick_source/sim_services/Clock/test/Makefile | 2 +- trick_source/sim_services/Executive/test/Makefile | 2 +- trick_source/sim_services/Integrator/test/Makefile | 2 +- trick_source/sim_services/MonteCarlo/test/Makefile | 2 +- trick_source/sim_services/ScheduledJobQueue/test/Makefile | 2 +- trick_source/sim_services/Timer/test/Makefile | 2 +- trick_source/trick_utils/SAIntegrator/unittest/Makefile | 2 +- trick_source/trick_utils/comm/test/Makefile | 2 +- trick_source/trick_utils/interpolator/test/Makefile | 2 +- trick_source/trick_utils/math/test/Makefile | 2 +- trick_source/trick_utils/unicode/test/Makefile | 2 +- trick_source/trick_utils/units/test/makefile | 2 +- 14 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test_macos.yml b/.github/workflows/test_macos.yml index a0e0f79c..d41a6e75 100644 --- a/.github/workflows/test_macos.yml +++ b/.github/workflows/test_macos.yml @@ -17,12 +17,7 @@ jobs: - name: Install gtest run: | - wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz - tar xzvf release-1.8.0.tar.gz - cd googletest-release-1.8.0/googletest - cmake . - make - make install + brew install googletest - name: Install dependencies run: | # sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.15.pkg -target / diff --git a/trick_source/data_products/DPX/test/unit_test/makefile b/trick_source/data_products/DPX/test/unit_test/makefile index a2260f9f..b3a58dca 100644 --- a/trick_source/data_products/DPX/test/unit_test/makefile +++ b/trick_source/data_products/DPX/test/unit_test/makefile @@ -30,7 +30,7 @@ else endif ifeq ($(TRICK_HOST_TYPE), Darwin) - CFLAGS += -DGTEST_HAS_TR1_TUPLE=0 + CFLAGS += -std=c++11 MOTIF_INCDIR = -I/sw/include XLIBS = -L/sw/lib -lXm -L/usr/X11R6/lib -L/usr/X11/lib SDK_DIR = $(shell xcrun --show-sdk-path) diff --git a/trick_source/sim_services/Clock/test/Makefile b/trick_source/sim_services/Clock/test/Makefile index cc1e34c4..8d00cd53 100644 --- a/trick_source/sim_services/Clock/test/Makefile +++ b/trick_source/sim_services/Clock/test/Makefile @@ -8,7 +8,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS} +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} LIBS = -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main diff --git a/trick_source/sim_services/Executive/test/Makefile b/trick_source/sim_services/Executive/test/Makefile index e2ca8492..0f032a43 100644 --- a/trick_source/sim_services/Executive/test/Makefile +++ b/trick_source/sim_services/Executive/test/Makefile @@ -8,7 +8,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS} +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} TRICK_LIBS = -L ${TRICK_LIB_DIR} -ltrick_mm -ltrick_units -ltrick TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main diff --git a/trick_source/sim_services/Integrator/test/Makefile b/trick_source/sim_services/Integrator/test/Makefile index f78fe80b..0a4d991f 100644 --- a/trick_source/sim_services/Integrator/test/Makefile +++ b/trick_source/sim_services/Integrator/test/Makefile @@ -8,7 +8,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -I${TRICK_HOME}/trick_source -I${TRICK_HOME}/include/trick/compat -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -DUSE_ER7_UTILS_INTEGRATORS=1 -DTEST ${TRICK_SYSTEM_CXXFLAGS} +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -I${TRICK_HOME}/trick_source -I${TRICK_HOME}/include/trick/compat -g -Wall -Wextra -std=c++11 -DUSE_ER7_UTILS_INTEGRATORS=1 -DTEST ${TRICK_SYSTEM_CXXFLAGS} TRICK_LIBS = -L${TRICK_LIB_DIR} -ltrick -ltrick_mm -ltrick_units -ltrick -ltrick_mm TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main diff --git a/trick_source/sim_services/MonteCarlo/test/Makefile b/trick_source/sim_services/MonteCarlo/test/Makefile index ac84d770..039d8184 100644 --- a/trick_source/sim_services/MonteCarlo/test/Makefile +++ b/trick_source/sim_services/MonteCarlo/test/Makefile @@ -8,7 +8,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CXXFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -std=c++11 +TRICK_CXXFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -std=c++11 TRICK_LIBS = -L${TRICK_LIB_DIR} -ltrick -ltrick_pyip -ltrick_comm -ltrick_math -ltrick_mm -ltrick_units TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main diff --git a/trick_source/sim_services/ScheduledJobQueue/test/Makefile b/trick_source/sim_services/ScheduledJobQueue/test/Makefile index f65f0e8e..1bf900a4 100644 --- a/trick_source/sim_services/ScheduledJobQueue/test/Makefile +++ b/trick_source/sim_services/ScheduledJobQueue/test/Makefile @@ -8,7 +8,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS} +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} TRICK_LIBS = -L${TRICK_LIB_DIR} -ltrick_mm -ltrick_units -ltrick -ltrick_mm -ltrick_units -ltrick TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main diff --git a/trick_source/sim_services/Timer/test/Makefile b/trick_source/sim_services/Timer/test/Makefile index 90463262..98338472 100644 --- a/trick_source/sim_services/Timer/test/Makefile +++ b/trick_source/sim_services/Timer/test/Makefile @@ -8,7 +8,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS} +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} TRICK_LIBS = -L${TRICK_LIB_DIR} -ltrick -ltrick_units -ltrick_mm TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main -lpthread diff --git a/trick_source/trick_utils/SAIntegrator/unittest/Makefile b/trick_source/trick_utils/SAIntegrator/unittest/Makefile index a29d4767..d7f90f24 100644 --- a/trick_source/trick_utils/SAIntegrator/unittest/Makefile +++ b/trick_source/trick_utils/SAIntegrator/unittest/Makefile @@ -3,7 +3,7 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common RM = rm -rf -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS} +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} INCLUDE_DIRS = -I../include -I$(GTEST_HOME)/include SAI_OBJDIR = obj diff --git a/trick_source/trick_utils/comm/test/Makefile b/trick_source/trick_utils/comm/test/Makefile index 543579cb..3671db95 100644 --- a/trick_source/trick_utils/comm/test/Makefile +++ b/trick_source/trick_utils/comm/test/Makefile @@ -7,7 +7,7 @@ INCLUDE_DIRS = -I$(GTEST_HOME) -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include # Use the trick_comm library only. libtrick.a would also work. TRICK_LIBS := ${TRICK_LIB_DIR}/libtrick_comm.a TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main -TRICK_CXXFLAGS += ${INCLUDE_DIRS} -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS} +TRICK_CXXFLAGS += ${INCLUDE_DIRS} -g -Wall -Wextra -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} # Automatically determine all executable names produced by this Makefile. TESTS = comm_test diff --git a/trick_source/trick_utils/interpolator/test/Makefile b/trick_source/trick_utils/interpolator/test/Makefile index 984fd914..376371a6 100644 --- a/trick_source/trick_utils/interpolator/test/Makefile +++ b/trick_source/trick_utils/interpolator/test/Makefile @@ -8,7 +8,7 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS} +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick.a TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main -lpthread diff --git a/trick_source/trick_utils/math/test/Makefile b/trick_source/trick_utils/math/test/Makefile index 8e28d9eb..3a090399 100644 --- a/trick_source/trick_utils/math/test/Makefile +++ b/trick_source/trick_utils/math/test/Makefile @@ -8,7 +8,7 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I${GTEST_HOME}/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS} +TRICK_CPPFLAGS += -I${GTEST_HOME}/include -I$(TRICK_HOME)/include -g -Wall -Wextra -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick_math.a TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main -lpthread diff --git a/trick_source/trick_utils/unicode/test/Makefile b/trick_source/trick_utils/unicode/test/Makefile index 782d18ff..f63c944b 100644 --- a/trick_source/trick_utils/unicode/test/Makefile +++ b/trick_source/trick_utils/unicode/test/Makefile @@ -8,7 +8,7 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS} +TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick.a TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lpthread diff --git a/trick_source/trick_utils/units/test/makefile b/trick_source/trick_utils/units/test/makefile index e1516d4d..97001036 100644 --- a/trick_source/trick_utils/units/test/makefile +++ b/trick_source/trick_utils/units/test/makefile @@ -7,7 +7,7 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common # Flags passed to the preprocessor. -TRICK_CPPFLAGS += -I${GTEST_HOME}/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS} +TRICK_CPPFLAGS += -I${GTEST_HOME}/include -I$(TRICK_HOME)/include -g -Wall -Wextra -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick_units.a TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main