fix: MSVC need config option
This commit is contained in:
parent
0f8158c964
commit
1cfc29560d
|
@ -48,7 +48,7 @@ jobs:
|
||||||
run: cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B ${{ env.BUILD_PATH }}
|
run: cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B ${{ env.BUILD_PATH }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build ${{ env.BUILD_PATH }} -j 4
|
run: cmake --build ${{ env.BUILD_PATH }} -j 4 --config ${{ env.BUILD_TYPE }}
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
|
@ -63,7 +63,7 @@ git submodule update --init --recursive
|
||||||
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -B build
|
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -B build
|
||||||
|
|
||||||
# Windows MSVC
|
# Windows MSVC
|
||||||
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -B build --config Release
|
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -B build
|
||||||
|
|
||||||
# Linux / macOS
|
# Linux / macOS
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -B build
|
cmake -DCMAKE_BUILD_TYPE=Release -B build
|
||||||
|
@ -72,5 +72,9 @@ cmake -DCMAKE_BUILD_TYPE=Release -B build
|
||||||
编译项目
|
编译项目
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
# Windows MSVC 需要在构建阶段指定 --config Release
|
||||||
|
cmake --build build --target all -j 8 --config Release
|
||||||
|
|
||||||
|
# Windows MinGW / Linux / macOS
|
||||||
cmake --build build --target all -j 8
|
cmake --build build --target all -j 8
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue