Skip to content

Commit

Permalink
Fix COMPILER_OVERRIDE variables, C++ lint
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Jul 19, 2024
1 parent 397a0eb commit 37027d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
version: 1.0

- name: Run tests
run: make cpp_lint
run: make cp_lint

cpp:
strategy:
Expand Down
6 changes: 5 additions & 1 deletion c/test_euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@
compilers: List[str] = []

if 'COMPILER_OVERRIDE' in environ:
compilers.extend(environ['COMPILER_OVERRIDE'].upper().split(','))
for comp in environ['COMPILER_OVERRIDE'].upper().split(','):
if comp in ('pcc', 'tcc'):
compilers.append(comp)
else:
compilers.extend(f'{comp}+{std}' for std in STANDARDS)
else:
if not (IN_TERMUX and GCC_BINARY == 'gcc') and which(GCC_BINARY): # Termux maps gcc->clang
compilers.extend(f'GCC+{std}' for std in STANDARDS)
Expand Down
3 changes: 2 additions & 1 deletion cplusplus/test_euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@
compilers: List[str] = []

if 'COMPILER_OVERRIDE' in environ:
compilers.extend(environ['COMPILER_OVERRIDE'].upper().split(','))
for comp in environ['COMPILER_OVERRIDE'].upper().split(','):
compilers.extend(f'{comp}+{std}' for std in STANDARDS)
else:
if not (IN_TERMUX and GCC_BINARY == 'g++') and which(GCC_BINARY): # Termux maps gcc->clang
compilers.extend(f'GCC+{std}' for std in STANDARDS)
Expand Down

0 comments on commit 37027d7

Please sign in to comment.