clang: Migrate to `CMake`, dropping `bear`.
parent
d1d383a5a7
commit
4a0f1aa919
|
@ -10,7 +10,7 @@ STAGED=$(
|
|||
TARGETS=()
|
||||
while IFS= read -r FILENAME
|
||||
do
|
||||
if [[ "$FILENAME" =~ .*\.c$ ]] || [[ "$FILENAME" =~ .*\.h$ ]]; then
|
||||
if [[ "$FILENAME" =~ .*\.c(pp)?$ ]] || [[ "$FILENAME" =~ .*\.h(pp)?$ ]]; then
|
||||
TARGETS+=("${FILENAME}")
|
||||
fi
|
||||
done <<< "$STAGED"
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
# Directory used by `direnv` to hold `use flake`-generated profiles.
|
||||
/.direnv/
|
||||
|
||||
# The compilation database produced by `bear`.
|
||||
/compile_commands.json
|
||||
|
||||
# The directory containing all build outputs.
|
||||
/dist/
|
||||
|
||||
|
@ -15,3 +12,19 @@
|
|||
|
||||
# A symlink produced by default when running `nix build`.
|
||||
/result
|
||||
|
||||
# The default executable built.
|
||||
/a.out
|
||||
|
||||
# Files generated by CMake.
|
||||
CMakeLists.txt.user
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
Testing
|
||||
Makefile
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
_deps
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
project(App VERSION 0.1.0)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
add_executable(a.out main.c)
|
|
@ -15,7 +15,7 @@
|
|||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, ... }:
|
||||
outputs = { nixpkgs, flake-utils, ... }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
@ -30,8 +30,8 @@
|
|||
stdenv = pkgs.clangStdenv;
|
||||
} {
|
||||
packages = with pkgs; [
|
||||
bear
|
||||
clang-tools
|
||||
cmake
|
||||
codelldb
|
||||
doxygen
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue