cmtk: enable some compile options

- use system zlib
- enabled bzip2
- enabled fftw
- enabled openmp for clang

- still disabled Grand Central Dispatch for linux because of build failure
- still disabled CUDA because of build failure
- still disabled mxml because of build failure
- still disabled lzma because of lack of lzmadec.h
- still disabled dcmtk because of build failure
This commit is contained in:
natsukium 2023-06-09 15:28:27 +09:00
parent 6bf04fc9c9
commit 7014b723d9
No known key found for this signature in database
GPG Key ID: 9EA45A31DB994C53

View File

@ -1,4 +1,12 @@
{ lib, stdenv, fetchurl, cmake }:
{ lib
, stdenv
, bzip2
, cmake
, fetchurl
, fftw
, llvmPackages
, zlib
}:
stdenv.mkDerivation rec {
pname = "cmtk";
@ -12,6 +20,14 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
buildInputs = [
bzip2
fftw
zlib
] ++ lib.optionals stdenv.cc.isClang [
llvmPackages.openmp
];
env.NIX_CFLAGS_COMPILE = toString [
(lib.optionalString stdenv.cc.isGNU "-std=c++11")
(lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing")