Skip to content

Commit

Permalink
优化 tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
wysaid committed Dec 9, 2023
1 parent b83ed0b commit 73d2b35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@
"args": [
"-l",
"tasks.sh",
"--target",
"graphicstest",
"--build",
"--run",
"graphicstest.exe",
],
"options": {
"cwd": "${workspaceFolder}"
},
"dependsOn": [
"Build XEGE Library"
],
"group": "build",
"problemMatcher": "$gcc"
}
Expand Down
8 changes: 4 additions & 4 deletions tasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ function cmakeBuildAll() {
export WIN_CMAKE_BUILD_DEFINE="--config $CMAKE_BUILD_TYPE"
fi

echo start: cmake.exe --build . --target demos $WIN_CMAKE_BUILD_DEFINE -- /m
echo start: cmake.exe --build . --target "$BUILD_TARGET" $WIN_CMAKE_BUILD_DEFINE -- /m
# ref: https://stackoverflow.com/questions/11865085/out-of-a-git-console-how-do-i-execute-a-batch-file-and-then-return-to-git-conso
if ! cmd "/C cmake.exe --build . --target demos $WIN_CMAKE_BUILD_DEFINE -- /m" && $EXIT_WHEN_FAILED; then
if ! cmd "/C cmake.exe --build . --target "$BUILD_TARGET" $WIN_CMAKE_BUILD_DEFINE -- /m" && $EXIT_WHEN_FAILED; then
exit 1
fi
echo end: cmake.exe --build . --target demos $WIN_CMAKE_BUILD_DEFINE -- /m
echo end: cmake.exe --build . --target "$BUILD_TARGET" $WIN_CMAKE_BUILD_DEFINE -- /m
else
if ! cmake --build . --target demos $(test -n "$CMAKE_BUILD_TYPE" && echo --config $CMAKE_BUILD_TYPE) -- -j $(nproc) && $EXIT_WHEN_FAILED; then
if ! cmake --build . --target "$BUILD_TARGET" $(test -n "$CMAKE_BUILD_TYPE" && echo --config $CMAKE_BUILD_TYPE) -- -j $(nproc) && $EXIT_WHEN_FAILED; then
exit 1
fi
fi
Expand Down

0 comments on commit 73d2b35

Please sign in to comment.