make build directory now prefixed with dot, as it what clangd expects, remove .clangd file

This commit is contained in:
veclavtalica 2024-11-05 01:56:50 +03:00
parent b18f6f1d87
commit f9bb6412b7
5 changed files with 5 additions and 12 deletions

View File

@ -1,2 +0,0 @@
CompileFlags:
CompilationDatabase: "./.build/"

4
.gitignore vendored
View File

@ -22,8 +22,8 @@
.vscode/ .vscode/
.idea/ .idea/
.cache/ .cache/
.build/ build/
.build-web/ build-web/
build/ build/
out/ out/

View File

@ -340,8 +340,3 @@ include_deps(${TWN_TARGET})
link_deps(${TWN_TARGET}) link_deps(${TWN_TARGET})
target_link_libraries(${TWN_TARGET} PUBLIC twn_third_parties) target_link_libraries(${TWN_TARGET} PUBLIC twn_third_parties)
target_include_directories(${TWN_TARGET} PRIVATE ${TWN_ROOT_DIR}/src) target_include_directories(${TWN_TARGET} PRIVATE ${TWN_ROOT_DIR}/src)
# move compie_commands.json into root directory so that it plays nicer with code editors without any configuration
add_custom_target(copy-compile-commands ALL
${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/compile_commands.json
${TWN_ROOT_DIR})

View File

@ -11,7 +11,7 @@ if [ -x "$(command -v clang)" ]; then
fi fi
if [ "$1" = "web" ]; then if [ "$1" = "web" ]; then
emcmake cmake $generator $cc -B .build-web "${@:2}" && cmake --build .build-web --parallel emcmake cmake $generator $cc -B build-web "${@:2}" && cmake --build build-web --parallel
else else
cmake $generator $cc -B .build "$@" && cmake --build .build --parallel cmake $generator $cc -B build "$@" && cmake --build build --parallel
fi fi

View File

@ -6,7 +6,7 @@ set +e
exe="$(basename $PWD)" exe="$(basename $PWD)"
toolpath="$(dirname -- "${BASH_SOURCE[0]}")" toolpath="$(dirname -- "${BASH_SOURCE[0]}")"
export TWNROOT=$(realpath "$toolpath"/../) export TWNROOT=$(realpath "$toolpath"/../)
export TWNBUILDDIR=$(realpath "$toolpath"/../.build) export TWNBUILDDIR=$(realpath "$toolpath"/../build)
case "$1" in case "$1" in
build ) "$toolpath"/build.sh "${@:2}" build ) "$toolpath"/build.sh "${@:2}"