From 1cfc29560d26d77881171f38c52a5a670ba38603 Mon Sep 17 00:00:00 2001 From: TaurusXin Date: Thu, 8 Feb 2024 10:49:07 +0800 Subject: [PATCH] fix: MSVC need config option --- .github/workflows/autobuild.yml | 2 +- README.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index d5e2156..60ac399 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -48,7 +48,7 @@ jobs: run: cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B ${{ env.BUILD_PATH }} - 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 uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index d2e90eb..e7c7824 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ git submodule update --init --recursive cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -B build # 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 cmake -DCMAKE_BUILD_TYPE=Release -B build @@ -72,5 +72,9 @@ cmake -DCMAKE_BUILD_TYPE=Release -B build 编译项目 ```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 ```