From ff9bfcc6f18a4a5e06418bedd9909ca409fdb3ea Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Fri, 26 Apr 2024 08:06:07 -0500 Subject: [PATCH] Remove --std=c++11 as the default c++ version #1700 Removed --std=c++11 from makefiles and where it would be added to generated makefiles. --- libexec/trick/make_makefile_swig | 2 +- share/trick/makefiles/Makefile.tricklib | 2 +- share/trick/makefiles/config_Linux.mk | 2 +- share/trick/makefiles/trickify.mk | 2 +- test/SIM_default_member_initializer/S_overrides.mk | 2 +- test/SIM_delete_default_constructor/S_overrides.mk | 2 +- test/SIM_job_class_order/S_overrides.mk | 2 +- test/SIM_mc_generation/S_overrides.mk | 2 +- test/SIM_stls/S_overrides.mk | 2 +- trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp | 4 ++-- trick_source/codegen/Interface_Code_Gen/makefile | 2 +- trick_source/data_products/makefile | 2 +- trick_source/sim_services/CommandLineArguments/test/Makefile | 2 +- trick_source/sim_services/DataRecord/Makefile | 2 +- trick_source/sim_services/Message/Makefile | 2 +- trick_source/sim_services/MonteCarlo/Makefile | 2 +- trick_source/sim_services/MonteCarloGeneration/Makefile | 2 +- trick_source/sim_services/Sie/Makefile | 2 +- trick_source/sim_services/ThreadBase/Makefile | 2 +- trick_source/sim_services/VariableServer/Makefile | 2 +- trick_source/sim_services/VariableServer/test/Makefile | 4 ++-- trick_source/trick_swig/Makefile | 2 +- trick_source/trick_utils/SAIntegrator/makefile | 2 +- trick_source/trick_utils/connection_handlers/Makefile | 2 +- trick_source/trick_utils/var_binary_parser/Makefile | 2 +- trick_source/web/CivetServer/makefile | 2 +- 26 files changed, 28 insertions(+), 28 deletions(-) diff --git a/libexec/trick/make_makefile_swig b/libexec/trick/make_makefile_swig index c182f248..f90ccec6 100755 --- a/libexec/trick/make_makefile_swig +++ b/libexec/trick/make_makefile_swig @@ -32,7 +32,7 @@ sub read_files_to_process() { # Prepend -I to each include path before we pass them to the compiler my @include_paths = map("-I$_", (get_include_paths(), "$ENV{TRICK_HOME}/include", "$ENV{TRICK_HOME}/include/trick/compat", "$ENV{TRICK_HOME}/trick_source", "../include")) ; - my @defines = (get_defines(), "-DTRICK_VER=$year", "-DSWIG", "-std=c++11") ; + my @defines = (get_defines(), "-DTRICK_VER=$year", "-DSWIG") ; # get the list of header files from the compiler open FILE_LIST, "$cc -MM @include_paths @defines S_source.hh |" ; diff --git a/share/trick/makefiles/Makefile.tricklib b/share/trick/makefiles/Makefile.tricklib index 2f524c34..83c49c44 100644 --- a/share/trick/makefiles/Makefile.tricklib +++ b/share/trick/makefiles/Makefile.tricklib @@ -96,7 +96,7 @@ $(TRICK_LIB_DIR): $(IO_C_OBJS): $(OBJ_DIR)/%.o : $(IO_SRC_DIR)%.c | $(OBJ_DIR) $(TRICK_CC) $(TRICK_CFLAGS) $(TRICK_SYSTEM_CFLAGS) -c $< -o $@ -$(IO_CPP_OBJS): TRICK_SYSTEM_CXXFLAGS += -std=c++11 +$(IO_CPP_OBJS): TRICK_SYSTEM_CXXFLAGS += $(IO_CPP_OBJS): TRICK_SYSTEM_CXXFLAGS += -Wno-invalid-offsetof ifeq ($(IS_CC_CLANG), 0) # cannot get an "expr" command to work on all platforms. Falling back to reliable perl. :) diff --git a/share/trick/makefiles/config_Linux.mk b/share/trick/makefiles/config_Linux.mk index 8a8876a0..05d4eebd 100644 --- a/share/trick/makefiles/config_Linux.mk +++ b/share/trick/makefiles/config_Linux.mk @@ -61,5 +61,5 @@ ifeq "" "c++11" TRICK_ADDITIONAL_CXXFLAGS += -std=c++11 -D_HAVE_STL_RANDOM endif -TRICK_ADDITIONAL_TEST_FLAGS += -std=c++11 +TRICK_ADDITIONAL_TEST_FLAGS += diff --git a/share/trick/makefiles/trickify.mk b/share/trick/makefiles/trickify.mk index 9f2ab8c9..b42a1158 100644 --- a/share/trick/makefiles/trickify.mk +++ b/share/trick/makefiles/trickify.mk @@ -135,7 +135,7 @@ $(dir $(TRICKIFY_OBJECT_NAME)) $(BUILD_DIR) $(dir $(TRICKIFY_PYTHON_DIR)) .trick $(IO_OBJECTS): %.o: %.cpp $(info $(call COLOR,Compiling) $<) - $(call ECHO_AND_LOG,$(TRICK_CXX) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -std=c++11 -Wno-invalid-offsetof -MMD -MP -c -o $@ $<) + $(call ECHO_AND_LOG,$(TRICK_CXX) $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) -Wno-invalid-offsetof -MMD -MP -c -o $@ $<) $(IO_OBJECTS:.o=.d): %.d: ; diff --git a/test/SIM_default_member_initializer/S_overrides.mk b/test/SIM_default_member_initializer/S_overrides.mk index 84cab458..50406526 100644 --- a/test/SIM_default_member_initializer/S_overrides.mk +++ b/test/SIM_default_member_initializer/S_overrides.mk @@ -1 +1 @@ -TRICK_CXXFLAGS += -Imodels -std=c++11 +TRICK_CXXFLAGS += -Imodels diff --git a/test/SIM_delete_default_constructor/S_overrides.mk b/test/SIM_delete_default_constructor/S_overrides.mk index 016cadcd..6ca9ea96 100644 --- a/test/SIM_delete_default_constructor/S_overrides.mk +++ b/test/SIM_delete_default_constructor/S_overrides.mk @@ -1,3 +1,3 @@ TRICK_CFLAGS += -I./models -TRICK_CXXFLAGS += -I./models -std=c++11 +TRICK_CXXFLAGS += -I./models diff --git a/test/SIM_job_class_order/S_overrides.mk b/test/SIM_job_class_order/S_overrides.mk index 016cadcd..6ca9ea96 100644 --- a/test/SIM_job_class_order/S_overrides.mk +++ b/test/SIM_job_class_order/S_overrides.mk @@ -1,3 +1,3 @@ TRICK_CFLAGS += -I./models -TRICK_CXXFLAGS += -I./models -std=c++11 +TRICK_CXXFLAGS += -I./models diff --git a/test/SIM_mc_generation/S_overrides.mk b/test/SIM_mc_generation/S_overrides.mk index 7e7c1958..acdb0d83 100644 --- a/test/SIM_mc_generation/S_overrides.mk +++ b/test/SIM_mc_generation/S_overrides.mk @@ -1,5 +1,5 @@ TRICK_CFLAGS += -g -Wall -Wextra -TRICK_CXXFLAGS += -g -std=c++11 -Wall -Wextra +TRICK_CXXFLAGS += -g -Wall -Wextra # We can't yet make warnings to be errors on MacOS, because # MACOS deprecates and warns about sprintf. But SWIG # still generates code containing sprintf.. diff --git a/test/SIM_stls/S_overrides.mk b/test/SIM_stls/S_overrides.mk index 5587ab4f..ea212889 100644 --- a/test/SIM_stls/S_overrides.mk +++ b/test/SIM_stls/S_overrides.mk @@ -2,7 +2,7 @@ TRICK_CFLAGS += -I./models TRICK_CXXFLAGS += -I./models -TRICK_CXXFLAGS += -std=c++11 +TRICK_CXXFLAGS += clean: checkpoint_clean diff --git a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp index 758a84cd..17b06cf8 100644 --- a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp +++ b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp @@ -439,11 +439,11 @@ void PrintAttributes::printIOMakefile() { << "ifeq ($(IS_CC_CLANG), 0)" << std::endl << " TRICK_IO_CXXFLAGS += -Wno-unused-local-typedefs -Wno-unused-but-set-variable" << std::endl << " ifeq ($(shell test $(GCC_MAJOR) -lt 6; echo $$?), 0)" << std::endl - << " TRICK_IO_CXXFLAGS += -std=c++11" << std::endl + << " TRICK_IO_CXXFLAGS +=" << std::endl << " endif" << std::endl << "endif" << std::endl << "ifeq ($(IS_CC_CLANG), 1)" << std::endl - << " TRICK_IO_CXXFLAGS += -std=c++14" << std::endl + << " TRICK_IO_CXXFLAGS +=" << std::endl << "endif" << std::endl << std::endl << "IO_OBJECTS =" ; diff --git a/trick_source/codegen/Interface_Code_Gen/makefile b/trick_source/codegen/Interface_Code_Gen/makefile index 3f3b8538..532c89c7 100644 --- a/trick_source/codegen/Interface_Code_Gen/makefile +++ b/trick_source/codegen/Interface_Code_Gen/makefile @@ -19,7 +19,7 @@ else ifeq ($(CLANG_MAJOR_GTEQ10),1) CXXFLAGS += -std=c++14 else -CXXFLAGS += -std=c++11 +CXXFLAGS += endif endif diff --git a/trick_source/data_products/makefile b/trick_source/data_products/makefile index 2a618450..14c22ca3 100644 --- a/trick_source/data_products/makefile +++ b/trick_source/data_products/makefile @@ -4,7 +4,7 @@ TRICK_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../..) -TRICK_CXXFLAGS += -std=c++11 +TRICK_CXXFLAGS += include ${TRICK_HOME}/share/trick/makefiles/Makefile.common diff --git a/trick_source/sim_services/CommandLineArguments/test/Makefile b/trick_source/sim_services/CommandLineArguments/test/Makefile index fc802211..c085f2e6 100644 --- a/trick_source/sim_services/CommandLineArguments/test/Makefile +++ b/trick_source/sim_services/CommandLineArguments/test/Makefile @@ -11,7 +11,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Mak TRICK_SYSTEM_CXXFLAGS := $(subst -isystem,-I,$(TRICK_SYSTEM_CXXFLAGS)) # Flags passed to the preprocessor. -TRICK_CXXFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_TEST_FLAGS} +TRICK_CXXFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_TEST_FLAGS} # so it seems like there's some weirdness linking in the bitfield objects since they are C MM_OBJECTS = $(TRICK_HOME)/trick_source/sim_services/MemoryManager/object_${TRICK_HOST_CPU}/extract_bitfield.o \ diff --git a/trick_source/sim_services/DataRecord/Makefile b/trick_source/sim_services/DataRecord/Makefile index 4ceb3e04..479a440f 100644 --- a/trick_source/sim_services/DataRecord/Makefile +++ b/trick_source/sim_services/DataRecord/Makefile @@ -2,7 +2,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../share/trick/makefiles/Makefi include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -include Makefile_deps -TRICK_CXXFLAGS += -std=c++11 +TRICK_CXXFLAGS += ifneq ($(HDF5),) ifneq ($(HDF5),/usr) diff --git a/trick_source/sim_services/Message/Makefile b/trick_source/sim_services/Message/Makefile index 80911292..2a5646f6 100644 --- a/trick_source/sim_services/Message/Makefile +++ b/trick_source/sim_services/Message/Makefile @@ -2,4 +2,4 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../share/trick/makefiles/Makefi include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -include Makefile_deps -TRICK_CXXFLAGS += -std=c++11 \ No newline at end of file +TRICK_CXXFLAGS += diff --git a/trick_source/sim_services/MonteCarlo/Makefile b/trick_source/sim_services/MonteCarlo/Makefile index 39101668..21837c10 100644 --- a/trick_source/sim_services/MonteCarlo/Makefile +++ b/trick_source/sim_services/MonteCarlo/Makefile @@ -3,7 +3,7 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -include Makefile_deps -TRICK_CXXFLAGS += -std=c++11 +TRICK_CXXFLAGS += ifeq ($(HAVE_GSL),1) TRICK_CXXFLAGS += -D_HAVE_GSL diff --git a/trick_source/sim_services/MonteCarloGeneration/Makefile b/trick_source/sim_services/MonteCarloGeneration/Makefile index 915b9526..d6ccbfa8 100644 --- a/trick_source/sim_services/MonteCarloGeneration/Makefile +++ b/trick_source/sim_services/MonteCarloGeneration/Makefile @@ -1,4 +1,4 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../share/trick/makefiles/Makefile.common include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -TRICK_CXXFLAGS += -std=c++11 +TRICK_CXXFLAGS += -include Makefile_deps diff --git a/trick_source/sim_services/Sie/Makefile b/trick_source/sim_services/Sie/Makefile index 80911292..2a5646f6 100644 --- a/trick_source/sim_services/Sie/Makefile +++ b/trick_source/sim_services/Sie/Makefile @@ -2,4 +2,4 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../share/trick/makefiles/Makefi include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -include Makefile_deps -TRICK_CXXFLAGS += -std=c++11 \ No newline at end of file +TRICK_CXXFLAGS += diff --git a/trick_source/sim_services/ThreadBase/Makefile b/trick_source/sim_services/ThreadBase/Makefile index 44838eb2..fb38c139 100644 --- a/trick_source/sim_services/ThreadBase/Makefile +++ b/trick_source/sim_services/ThreadBase/Makefile @@ -1,4 +1,4 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../share/trick/makefiles/Makefile.common include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -include Makefile_deps -TRICK_CXXFLAGS += -std=c++11 \ No newline at end of file +TRICK_CXXFLAGS += diff --git a/trick_source/sim_services/VariableServer/Makefile b/trick_source/sim_services/VariableServer/Makefile index 194c4b8f..fb38c139 100644 --- a/trick_source/sim_services/VariableServer/Makefile +++ b/trick_source/sim_services/VariableServer/Makefile @@ -1,4 +1,4 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../share/trick/makefiles/Makefile.common include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -include Makefile_deps -TRICK_CXXFLAGS += -std=c++11 +TRICK_CXXFLAGS += diff --git a/trick_source/sim_services/VariableServer/test/Makefile b/trick_source/sim_services/VariableServer/test/Makefile index 7d7fdbff..92917244 100644 --- a/trick_source/sim_services/VariableServer/test/Makefile +++ b/trick_source/sim_services/VariableServer/test/Makefile @@ -11,7 +11,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Mak TRICK_SYSTEM_CXXFLAGS := $(subst -isystem,-I,$(TRICK_SYSTEM_CXXFLAGS)) -Wno-unused-command-line-argument # Flags passed to the preprocessor. -TRICK_CXXFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -Wno-sign-compare -std=c++11 ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_TEST_FLAGS} +TRICK_CXXFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -Wno-sign-compare ${TRICK_SYSTEM_CXXFLAGS} ${TRICK_TEST_FLAGS} TRICK_LIBS = -L${TRICK_LIB_DIR} -ltrick_mm -ltrick_units -ltrick_comm -ltrick_pyip -ltrick -ltrick_mm -ltrick_units -ltrick_comm -ltrick_pyip -ltrick -ltrick_var_binary_parser -ltrick_connection_handlers -ltrick_comm TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main -lgmock -lpthread @@ -93,4 +93,4 @@ code-coverage: test clean : rm -f $(TESTS) rm -f *.gcno *.gcda - rm -rf io_src xml obj \ No newline at end of file + rm -rf io_src xml obj diff --git a/trick_source/trick_swig/Makefile b/trick_source/trick_swig/Makefile index 2dbd551f..816aeeea 100644 --- a/trick_source/trick_swig/Makefile +++ b/trick_source/trick_swig/Makefile @@ -25,7 +25,7 @@ PY_FILES = \ ${TRICK_HOME}/share/trick/swig/swig_ref.py SWIG_SRC_FILES = $(addprefix swig_${TRICK_HOST_CPU}/, $(notdir $(subst .o,.cpp,$(SWIG_OBJECT_FILES)))) -TRICK_CXXFLAGS += $(PYTHON_INCLUDES) -Wno-redundant-decls -Wno-shadow -Wno-unused-parameter -Wno-missing-field-initializers -std=c++11 +TRICK_CXXFLAGS += $(PYTHON_INCLUDES) -Wno-redundant-decls -Wno-shadow -Wno-unused-parameter -Wno-missing-field-initializers ifeq ($(IS_CC_CLANG), 1) TRICK_CXXFLAGS += -Wno-self-assign -Wno-sometimes-uninitialized diff --git a/trick_source/trick_utils/SAIntegrator/makefile b/trick_source/trick_utils/SAIntegrator/makefile index cdd6eaeb..e4660985 100644 --- a/trick_source/trick_utils/SAIntegrator/makefile +++ b/trick_source/trick_utils/SAIntegrator/makefile @@ -3,7 +3,7 @@ RM = rm -rf CC = cc CPP = c++ -CFLAGS = -g -Wall -std=c++11 ${TRICK_CXXFLAGS} +CFLAGS = -g -Wall ${TRICK_CXXFLAGS} INCLUDE_DIRS = -Iinclude OBJDIR = obj LIBDIR = lib diff --git a/trick_source/trick_utils/connection_handlers/Makefile b/trick_source/trick_utils/connection_handlers/Makefile index 3e66afd6..ef377ff5 100644 --- a/trick_source/trick_utils/connection_handlers/Makefile +++ b/trick_source/trick_utils/connection_handlers/Makefile @@ -9,7 +9,7 @@ TRICK_LIB := $(TRICK_LIB_DIR)/libtrick_connection_handlers.a include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -include Makefile_deps -TRICK_CXXFLAGS += -std=c++11 +TRICK_CXXFLAGS += # make the comm library when called by the master makefile. trick: ${TRICK_LIB} diff --git a/trick_source/trick_utils/var_binary_parser/Makefile b/trick_source/trick_utils/var_binary_parser/Makefile index 5c956098..75f60f9c 100644 --- a/trick_source/trick_utils/var_binary_parser/Makefile +++ b/trick_source/trick_utils/var_binary_parser/Makefile @@ -6,7 +6,7 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common #include ${TRICK_HOME}/share/trick/makefiles/Makefile.tricklib -CPP_FLAGS = -g -Wall -Wextra -std=c++11 $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) +CPP_FLAGS = -g -Wall -Wextra $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) INCLUDE_DIRS = -I${TRICK_HOME}/include OBJDIR = obj LIBDIR = lib diff --git a/trick_source/web/CivetServer/makefile b/trick_source/web/CivetServer/makefile index fce4065f..7fc48864 100644 --- a/trick_source/web/CivetServer/makefile +++ b/trick_source/web/CivetServer/makefile @@ -9,7 +9,7 @@ CP = cp MKDIR = mkdir CFLAGS = -g -Wall -CPPFLAGS = -g -Wall -std=c++11 +CPPFLAGS = -g -Wall INCLUDE_DIRS = -I${PWD}/include -I${CIVETWEB_HOME}/include -I${TRICK_HOME}/include