From f9bb6412b7bcca588d8c2199c6ee2e93a58c4bc9 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Tue, 5 Nov 2024 01:56:50 +0300 Subject: [PATCH] make build directory now prefixed with dot, as it what clangd expects, remove .clangd file --- .clangd | 2 -- .gitignore | 4 ++-- CMakeLists.txt | 5 ----- bin/build.sh | 4 ++-- bin/twn.sh | 2 +- 5 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 .clangd diff --git a/.clangd b/.clangd deleted file mode 100644 index c835fb9..0000000 --- a/.clangd +++ /dev/null @@ -1,2 +0,0 @@ -CompileFlags: - CompilationDatabase: "./.build/" diff --git a/.gitignore b/.gitignore index c7cf079..f3c5d5f 100644 --- a/.gitignore +++ b/.gitignore @@ -22,8 +22,8 @@ .vscode/ .idea/ .cache/ -.build/ -.build-web/ +build/ +build-web/ build/ out/ diff --git a/CMakeLists.txt b/CMakeLists.txt index d25176b..3c0bc5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -340,8 +340,3 @@ include_deps(${TWN_TARGET}) link_deps(${TWN_TARGET}) target_link_libraries(${TWN_TARGET} PUBLIC twn_third_parties) 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}) diff --git a/bin/build.sh b/bin/build.sh index 97d5a51..fb06c3b 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -11,7 +11,7 @@ if [ -x "$(command -v clang)" ]; then fi 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 - cmake $generator $cc -B .build "$@" && cmake --build .build --parallel + cmake $generator $cc -B build "$@" && cmake --build build --parallel fi diff --git a/bin/twn.sh b/bin/twn.sh index 128df36..95bfdfa 100755 --- a/bin/twn.sh +++ b/bin/twn.sh @@ -6,7 +6,7 @@ set +e exe="$(basename $PWD)" toolpath="$(dirname -- "${BASH_SOURCE[0]}")" export TWNROOT=$(realpath "$toolpath"/../) -export TWNBUILDDIR=$(realpath "$toolpath"/../.build) +export TWNBUILDDIR=$(realpath "$toolpath"/../build) case "$1" in build ) "$toolpath"/build.sh "${@:2}"