diff --git a/pkgs/development/compilers/adaptivecpp/tests.nix b/pkgs/development/compilers/adaptivecpp/tests.nix index 0bae890bbde1..f91af4c08929 100644 --- a/pkgs/development/compilers/adaptivecpp/tests.nix +++ b/pkgs/development/compilers/adaptivecpp/tests.nix @@ -1,8 +1,10 @@ { + lib, stdenv, adaptivecpp, # after cursory testing it seems like this isn't really useful, but if errors pop up, maybe look into restricting the targets - #targets ? "", + targetsBuild ? null, + targetsRun ? null, }: stdenv.mkDerivation (finalAttrs: { pname = "${adaptivecpp.pname}-tests"; @@ -15,11 +17,14 @@ stdenv.mkDerivation (finalAttrs: { sourceRoot = "${adaptivecpp.src.name}/tests"; - cmakeFlags = [ - # see above - #"-DACCP_TARGETS=\"${targets}\"" - "-DAdaptiveCpp_DIR=${adaptivecpp}/lib/cmake/AdaptiveCpp" - ]; + cmakeFlags = + [ + # see above + "-DAdaptiveCpp_DIR=${adaptivecpp}/lib/cmake/AdaptiveCpp" + ] + ++ lib.optionals (targetsBuild != null) [ + "-DACCP_TARGETS=\"${targetsBuild}\"" + ]; doCheck = true; checkPhase = '' @@ -27,6 +32,7 @@ stdenv.mkDerivation (finalAttrs: { mkdir home export HOME=`pwd`/home + ${lib.strings.optionalString (targetsRun != null) "export ACPP_VISIBILITY_MASK=\"${targetsRun}\""} ./sycl_tests '';