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