22 lines
501 B
Batchfile
22 lines
501 B
Batchfile
@ECHO off
|
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
|
|
|
Echo [ > compile_commands.json
|
|
|
|
FOR /r "src\" %%F IN (*.cpp) DO (
|
|
|
|
SET "file=%%F"
|
|
SET "file=!file:\=/!"
|
|
SET "directory=%~dp0"
|
|
SET "directory=!directory:\=/!"
|
|
|
|
ECHO { >> compile_commands.json
|
|
ECHO "directory": "!directory!", >> compile_commands.json
|
|
ECHO "command": "cl !file! Ws2_32.lib -I inc -std:c++20 -Fo:obj\\", >> compile_commands.json
|
|
ECHO "file": "!file!" >> compile_commands.json
|
|
ECHO }, >> compile_commands.json
|
|
|
|
)
|
|
|
|
ECHO ] >> compile_commands.json
|