diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d652d9..314b638 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ cppm_cxx_standard(17) cppm_compiler_option( DEBUG CLANG "-fprofile-instr-generate -fcoverage-mapping" - GCC "-fprofile-arcs -ftest-coverage" + GCC "--coverage -fno-inline -fno-inline-small-functions -fno-default-inline" ) find_cppkg(benchmark 1.5.2 MODULE benchmark::benchmark TYPE lib OPTIONAL OFF) diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ca5719e --- /dev/null +++ b/flake.nix @@ -0,0 +1,34 @@ +# in flake.nix +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem + (system: + let + overlays = []; + pkgs = import nixpkgs { + inherit system overlays; + }; + in + with pkgs; + { + devShells.default = mkShell { + nativeBuildInputs = [ + #llvmPackages_17.stdenv + gcc13Stdenv + ccache + cmake + ninja + lcov + ]; + shellHook = '' + export CC=gcc + export CXX=g++ + ''; + }; + } + ); +}