Loading ci_cd/lab0.yml +2 −5 Original line number Diff line number Diff line Loading @@ -54,12 +54,9 @@ test_lab_0: <<: *common_rules_0 script: - echo "Testing Lab 0"; - make - cp lab0.o base_0/tests - cd base_0/tests - g++ -c Support/Common.cpp - g++ -c LabZero.cpp - g++ lab0.o LabZero.o - ./a.out - make test - ./test needs: [lint_lab_0] tags: [c++-17] No newline at end of file tests/LabOne.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2,4 +2,4 @@ // Created by Ari Trachtenberg on 9/10/24. // #include "LabOne.h" //#include "LabOne.h" tests/Makefile 0 → 100644 +39 −0 Original line number Diff line number Diff line # Makefile, generated with support of ChatGPT # Compiler and flags CXX = g++ CXXFLAGS = -Wall -std=c++17 # Source files SRCS = LabOne.cpp LabZero.cpp lab0.cpp Support/Common.cpp # Object files OBJS = LabOne.o LabZero.o lab0.o Support/Common.o # Executable name EXEC = test # Default target to build the executable all: $(EXEC) # Rule to build the executable from object files $(EXEC): $(OBJS) $(CXX) $(CXXFLAGS) -o $(EXEC) $(OBJS) # Rules to build object files from source files, with dependency on the Common.h header LabOne.o: LabOne.cpp Support/Common.h $(CXX) $(CXXFLAGS) -c LabOne.cpp LabZero.o: LabZero.cpp Support/Common.h $(CXX) $(CXXFLAGS) -c LabZero.cpp $(SUPPORT_DIR)/Common.o: Support/Common.cpp Support/Common.h $(CXX) $(CXXFLAGS) -c $(SUPPORT_DIR)/Common.cpp # only recompile lab0.o if it changes lab0.o: $(CXX) $(CXXFLAGS) -c lab0.cpp # Clean target to remove compiled files clean: rm -f $(OBJS) $(EXEC) Loading
ci_cd/lab0.yml +2 −5 Original line number Diff line number Diff line Loading @@ -54,12 +54,9 @@ test_lab_0: <<: *common_rules_0 script: - echo "Testing Lab 0"; - make - cp lab0.o base_0/tests - cd base_0/tests - g++ -c Support/Common.cpp - g++ -c LabZero.cpp - g++ lab0.o LabZero.o - ./a.out - make test - ./test needs: [lint_lab_0] tags: [c++-17] No newline at end of file
tests/LabOne.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2,4 +2,4 @@ // Created by Ari Trachtenberg on 9/10/24. // #include "LabOne.h" //#include "LabOne.h"
tests/Makefile 0 → 100644 +39 −0 Original line number Diff line number Diff line # Makefile, generated with support of ChatGPT # Compiler and flags CXX = g++ CXXFLAGS = -Wall -std=c++17 # Source files SRCS = LabOne.cpp LabZero.cpp lab0.cpp Support/Common.cpp # Object files OBJS = LabOne.o LabZero.o lab0.o Support/Common.o # Executable name EXEC = test # Default target to build the executable all: $(EXEC) # Rule to build the executable from object files $(EXEC): $(OBJS) $(CXX) $(CXXFLAGS) -o $(EXEC) $(OBJS) # Rules to build object files from source files, with dependency on the Common.h header LabOne.o: LabOne.cpp Support/Common.h $(CXX) $(CXXFLAGS) -c LabOne.cpp LabZero.o: LabZero.cpp Support/Common.h $(CXX) $(CXXFLAGS) -c LabZero.cpp $(SUPPORT_DIR)/Common.o: Support/Common.cpp Support/Common.h $(CXX) $(CXXFLAGS) -c $(SUPPORT_DIR)/Common.cpp # only recompile lab0.o if it changes lab0.o: $(CXX) $(CXXFLAGS) -c lab0.cpp # Clean target to remove compiled files clean: rm -f $(OBJS) $(EXEC)