From e0a38171d4028695f186cd318dd8b91551ba646a Mon Sep 17 00:00:00 2001 From: Andrey Nefedov Date: Sun, 15 Dec 2024 19:25:16 +0000 Subject: [PATCH 1/2] config files improvements --- .clang-format | 1 + .envrc | 2 +- .gitignore | 7 +++++++ CMakeLists.txt | 4 ++++ flake.nix | 14 +++++++++++++- 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.clang-format b/.clang-format index cc850bf08b..831777e823 100644 --- a/.clang-format +++ b/.clang-format @@ -9,4 +9,5 @@ InsertNewlineAtEOF: true NamespaceIndentation: All SpaceAfterTemplateKeyword: false TabWidth: 4 +IncludeBlocks: Preserve ... diff --git a/.envrc b/.envrc index 8392d159f2..2f0067c5b6 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -use flake \ No newline at end of file +use flake ${PLACEHOLDER_DEVELOP_DERIVATION:-.} diff --git a/.gitignore b/.gitignore index 1230c719f2..06953e78cd 100644 --- a/.gitignore +++ b/.gitignore @@ -347,6 +347,7 @@ modules.xml ### CMake ### CMakeLists.txt.user CMakeCache.txt +CMakeUserPresets.json CMakeFiles CMakeScripts Testing @@ -640,3 +641,9 @@ callgrind.* .ycm_extra_config.py .color_coded + +# VSCode configuration +.vscode + +# direnv outputs +.direnv diff --git a/CMakeLists.txt b/CMakeLists.txt index 01bd799905..c24a9e8fee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,10 @@ set_target_properties(crypto3_precompiled_headers PROPERTIES CXX_STANDARD_REQUIRED TRUE ) +if (ENABLE_TESTS) + enable_testing() +endif() + add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/crypto3") if ((${PARALLEL_CRYPTO3_ENABLE}) OR (${PROOF_PRODUCER_ENABLE})) add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/parallel-crypto3") diff --git a/flake.nix b/flake.nix index 08ec737c75..33cfeeafe5 100644 --- a/flake.nix +++ b/flake.nix @@ -109,7 +109,19 @@ parallel_crypto3_tets = true; crypto3_bechmarks = true; parallel_crypto3_bechmarks = true; - }); + }); + + develop-clang = (pkgs.callPackage ./proof-producer.nix { + stdenv = pkgs.llvmPackages_19.stdenv; + enableDebug = true; + runTests = true; + sanitize = true; + crypto3_tests = true; + parallel_crypto3_tets = true; + crypto3_bechmarks = true; + parallel_crypto3_bechmarks = true; + }); + # The "all" package will build all packages. Convenient for CI, # so that "nix build" will check that all packages are correct. # The packages that have no changes will not be rebuilt, and instead From b2f11f090224d5ce86d3954837656a3916541c78 Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Tue, 17 Dec 2024 17:41:16 +0100 Subject: [PATCH 2/2] remove enable_test function from the root CMake --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c24a9e8fee..01bd799905 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,10 +30,6 @@ set_target_properties(crypto3_precompiled_headers PROPERTIES CXX_STANDARD_REQUIRED TRUE ) -if (ENABLE_TESTS) - enable_testing() -endif() - add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/crypto3") if ((${PARALLEL_CRYPTO3_ENABLE}) OR (${PROOF_PRODUCER_ENABLE})) add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/parallel-crypto3")