adaptivecpp: improve args passed to tests

This commit is contained in:
blenderfreaky
2024-12-05 02:59:37 +01:00
parent 8c8739e515
commit b091499b2e
@@ -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
'';