From 75e0b99eb32f0a0f0a6d0cf73e6ca69e3c2cd154 Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Sat, 7 Sep 2024 17:46:42 +0200 Subject: [PATCH] move flags from flake to cmake --- parallel-crypto3/CMakeLists.txt | 4 ++++ parallel-crypto3/parallel-crypto3.nix | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/parallel-crypto3/CMakeLists.txt b/parallel-crypto3/CMakeLists.txt index 916a540389..e4906392e2 100644 --- a/parallel-crypto3/CMakeLists.txt +++ b/parallel-crypto3/CMakeLists.txt @@ -3,6 +3,10 @@ project(parallel-crypto3) find_package(CM) +if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") + set(CMAKE_CXX_FLAGS "-ggdb -O0") +endif() + # This is useful due to some build systems (Ninja in particular) are piping # compiler output and compiler switches it's output to plain text option (FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." FALSE) diff --git a/parallel-crypto3/parallel-crypto3.nix b/parallel-crypto3/parallel-crypto3.nix index adb78ca271..189efbc710 100644 --- a/parallel-crypto3/parallel-crypto3.nix +++ b/parallel-crypto3/parallel-crypto3.nix @@ -28,10 +28,7 @@ in stdenv.mkDerivation { cmakeFlags = [ (if runTests then "-DBUILD_TESTS=TRUE" else "") - (if runTests then "-DCMAKE_ENABLE_TESTS=TRUE" else "") (if enableDebug then "-DCMAKE_BUILD_TYPE=Debug" else "-DCMAKE_BUILD_TYPE=Release") - (if enableDebug then "-DCMAKE_CXX_FLAGS=-ggdb" else "") - (if enableDebug then "-DCMAKE_CXX_FLAGS=-O0" else "") ]; doCheck = runTests; # tests are inside crypto3-tests derivation