mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-16 04:07:27 +08:00
Configure default compiler for just
This commit is contained in:
parent
5bd1b61755
commit
72c752bfdd
@ -86,7 +86,7 @@ make clean
|
||||
### 编译运行
|
||||
|
||||
```bash
|
||||
just # 在Windows上默认使用 gcc 编译,在Linux上默认使用cc编译
|
||||
just # 在Windows上默认使用 gcc 编译,在macOS上默认使用 clang 编译,在其他系统上默认使用 cc 编译
|
||||
just CC=clang # 使用 clang 编译
|
||||
just CC=gcc # 使用 gcc 编译
|
||||
```
|
||||
|
11
justfile
11
justfile
@ -7,7 +7,7 @@
|
||||
# Contributors : Nul None <nul@none.org>
|
||||
# |
|
||||
# Created On : <2025-06-18>
|
||||
# Last Modified : <2025-06-19>
|
||||
# Last Modified : <2025-06-20>
|
||||
#
|
||||
# just (build)
|
||||
# just debug
|
||||
@ -23,7 +23,14 @@
|
||||
|
||||
set windows-shell := ['cmd', '/c']
|
||||
|
||||
CC := 'gcc'
|
||||
CC := if os() == 'windows' {
|
||||
"gcc"
|
||||
} else if os() == 'macos' {
|
||||
"clang"
|
||||
} else {
|
||||
"cc"
|
||||
}
|
||||
|
||||
DEBUGGER := 'gdb'
|
||||
|
||||
CFLAGS_base := '-Iinclude -Ilib'
|
||||
|
Loading…
x
Reference in New Issue
Block a user