Skip to content

Commit

Permalink
Merge pull request #120 from hwangswan/master
Browse files Browse the repository at this point in the history
.cpp to .cc for faster typing
  • Loading branch information
trhgquan authored Mar 8, 2023
2 parents f0df414 + 5e37ec3 commit 6535f97
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ CXXFLAGS := -Wall -static -static-libgcc -static-libstdc++ -std=c++17
# For compiling
SRC_DIR := src
OBJ_DIR := obj
SRC_FILES := $(wildcard $(SRC_DIR)/*.cpp)
OBJ_FILES := $(patsubst $(SRC_DIR)/%.cpp, $(OBJ_DIR)/%.o, $(SRC_FILES))
SRC_FILES := $(wildcard $(SRC_DIR)/*.cc)
OBJ_FILES := $(patsubst $(SRC_DIR)/%.cc, $(OBJ_DIR)/%.o, $(SRC_FILES))
EXECUTABLE_NAME := main

# For testing
Expand All @@ -15,14 +15,14 @@ TEST_DRIVER_ENGINE := perl
TEST_PAYLOAD := cd $(TEST_DIR) && pwd && $(TEST_DRIVER_ENGINE) $(TEST_DRIVER)

# For linting and format
LINT_PAYLOAD := find src/ -iname *.c -o -iname *.cpp -o -iname *.h | xargs clang-format --dry-run --Werror -style=file
FORMAT_PAYLOAD := find src/ -iname *.c -o -iname *.cpp -o -iname *.h | xargs clang-format -i -style=file
LINT_PAYLOAD := find src/ -iname *.c -o -iname *.cc -o -iname *.h | xargs clang-format --dry-run --Werror -style=file
FORMAT_PAYLOAD := find src/ -iname *.c -o -iname *.cc -o -iname *.h | xargs clang-format -i -style=file

# For coverage
COVERAGE_FILENAME := coverage.info
COVERAGE_OUTPUT_DIR := coverage
COVERAGE_INIT_PAYLOAD := lcov --capture --directory obj --output-file=$(COVERAGE_FILENAME)
COVERAGE_EXTRACT_PAYLOAD := lcov --extract $(COVERAGE_FILENAME) '*.cpp' -o $(COVERAGE_FILENAME)
COVERAGE_EXTRACT_PAYLOAD := lcov --extract $(COVERAGE_FILENAME) '*.cc' -o $(COVERAGE_FILENAME)
COVERAGE_GENERATE_REPORT_PAYLOAD := genhtml $(COVERAGE_FILENAME) --output-directory=$(COVERAGE_OUTPUT_DIR)

# For cleaning
Expand All @@ -35,7 +35,7 @@ $(EXECUTABLE_NAME): $(OBJ_FILES)
$(CXX) $(CXXFLAGS) -o $@ $^

# Compile to object files
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cpp
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.cc
@ mkdir -p $(OBJ_DIR)
$(CXX) $(CXXFLAGS) -c -o $@ $<

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6535f97

Please sign in to comment.