Skip to content

Commit

Permalink
Update linux build to C++ 14
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileYzn committed Jan 30, 2024
1 parent 488cab3 commit 28d7f2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
build:

runs-on: ubuntu-latest
container: ubuntu:18.04

steps:
- uses: actions/checkout@v3
Expand All @@ -22,10 +21,7 @@ jobs:
run: apt-get update

- name: Install build dependencies
run: apt-get install -qq -y wget unzip build-essential gcc-4.8-multilib g++-4.8-multilib libgcc1:i386

- name: Update alternatives
run: update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 100 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
run: apt-get install -qq -y wget unzip build-essential gcc-multilib g++-multilib

- name: Run build
working-directory: ./MatchBot
Expand Down
4 changes: 2 additions & 2 deletions MatchBot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ LINKER += -static-libgcc -static-libstdc++
endif

# C flags
CFLAGS = -std=gnu++11 -pipe -g0 -O3 -s -flto -funroll-loops -fno-stack-protector -g -DNDEBUG -Dlinux -D__linux__ -D_GLIBCXX_USE_CXX11_ABI=0 -m32 -msse3 -msse4.1 -shared
CFLAGS = -std=gnu++14 -pipe -g0 -O3 -s -flto -funroll-loops -fno-stack-protector -g -DNDEBUG -Dlinux -D__linux__ -D_GLIBCXX_USE_CXX11_ABI=0 -m32 -msse3 -msse4.1 -shared

# Include directory
INCLUDE = -I. -I$(CSSDK)/common -I$(CSSDK)/dlls -I$(CSSDK)/engine -I$(CSSDK)/game_shared -I$(CSSDK)/pm_shared -I$(CSSDK)/public -I$(METAMOD)
Expand All @@ -50,7 +50,7 @@ $(NAME): $(OBJ_LINUX)
$(COMPILER) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINKER) -o$(BIN_DIR)/$(NAME)_mm.so

check:
cppcheck $(INCLUDE) --quiet --max-configs=100 --std=gnu++11 -DNDEBUG -Dlinux -D__linux__ -U_FORTIFY_SOURCE .
cppcheck $(INCLUDE) --quiet --max-configs=100 --std=gnu++14 -DNDEBUG -Dlinux -D__linux__ -U_FORTIFY_SOURCE .

default: all

Expand Down

0 comments on commit 28d7f2f

Please sign in to comment.