Skip to content

Instantly share code, notes, and snippets.

View Str1ker17's full-sized avatar

Alexey Suslov Str1ker17

  • Russia, Novosibirsk
View GitHub Profile
@Str1ker17
Str1ker17 / gist:97549584fa5a380417246d204db07f2a
Created April 19, 2022 07:30
Use JQ to manipulate compiledb manually
Show (first):
jq -r '(.[0].arguments | join(" ")) + " PWD=" + .[0].directory' compile_commands.json
Show (by file, all args):
jq -r '(.[] | select(.file | endswith("dir/file.c"))) | .arguments | join(" ")' compile_commands.json
Show (by file, filtered args):
jq -r '(.[] | select(.file | endswith("dir/file.c"))) | .arguments[] | select(startswith("-m"))' compile_commands.json
Run (first, better):
@Str1ker17
Str1ker17 / solution_post_compiler_compat.h
Last active December 7, 2023 18:23
The most possible complete compat file for MSVS/R# to support GCC code
/* Get the newest version from https://gist.github.com/Str1ker17/3addcd2c768bc96fd7c1487594eae582 */
#pragma once
/*
* Preparations to enter full GCC mode
*/
// ensure we completely hid IDE identity
#undef _WIN32