From 49ccc769333e597a9f679f0c552e55a7dff206ce Mon Sep 17 00:00:00 2001 From: Timerix Date: Sun, 9 Nov 2025 20:32:34 +0500 Subject: [PATCH] added default_vscode/c_cpp_properties.json --- CHANGELOG.md | 2 ++ cbuild.sh | 6 ++++-- default.config | 4 ++-- default_vscode/c_cpp_properties.json | 14 ++++++++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 default_vscode/c_cpp_properties.json diff --git a/CHANGELOG.md b/CHANGELOG.md index cb86d56..003736b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## 2.2.4 + **default config**: C standard changed to C99 + **default config**: enabled more warnings ++ added file `default_vscode/c_cpp_properties.json` ++ fixed copying of `default_vscode` files ## 2.2.3 + removed `\r` characters from `detect_os.sh` diff --git a/cbuild.sh b/cbuild.sh index dea8a06..5111239 100644 --- a/cbuild.sh +++ b/cbuild.sh @@ -106,8 +106,10 @@ do if ask_yn "Copy default .vscode launch tasks?"; then new_project_vscode_dir="$new_project_dir/.vscode" - mkdir -p "$new_project_vscode_dir" - cp -vr "$CBUILD_INSTALL_DIR/default_vscode/"* "$new_project_vscode_dir/" + mkdir -pv "$new_project_vscode_dir" + for vscode_dir_f in $(find "$CBUILD_INSTALL_DIR/default_vscode/" -type f); do + cp -vr "$vscode_dir_f" "$new_project_vscode_dir/" + done sed "s,\%PROJECT_NAME\%,$project_name,g" \ "$new_project_vscode_dir/launch.json" > "$new_project_vscode_dir/launch.json.temp" mv "$new_project_vscode_dir/launch.json.temp" "$new_project_vscode_dir/launch.json" diff --git a/default.config b/default.config index c322ff1..43a14fe 100644 --- a/default.config +++ b/default.config @@ -33,9 +33,9 @@ ENABLED_DEPENDENCIES='' # └── profile/ - gcc *.gcda profiling info files OBJDIR="obj" OUTDIR="bin" -STATIC_LIB_FILE="lib$PROJECT.a" +STATIC_LIB_FILE="$PROJECT.a" -# example: "-I./dependencies/include/SDL2" +# example: "-I./include" INCLUDE="" # OS-specific options diff --git a/default_vscode/c_cpp_properties.json b/default_vscode/c_cpp_properties.json new file mode 100644 index 0000000..a1a1f7c --- /dev/null +++ b/default_vscode/c_cpp_properties.json @@ -0,0 +1,14 @@ +{ + "configurations": [ + { + "name": "all", + "defines": [], + "includePath": [ + // "include", + "${default}" + ], + "cStandard": "c99" + } + ], + "version": 4 +} \ No newline at end of file