COMPMID-2452: fixed linker error when cppscheduler=0

Change-Id: I1227436d856f3488635e2b00c886a4deea963f14
Signed-off-by: Pablo Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2114
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/tests/validation/NEON/UNIT/RuntimeContext.cpp b/tests/validation/NEON/UNIT/RuntimeContext.cpp
index 05670a9..68fb0da 100644
--- a/tests/validation/NEON/UNIT/RuntimeContext.cpp
+++ b/tests/validation/NEON/UNIT/RuntimeContext.cpp
@@ -23,8 +23,8 @@
  */
 #include "arm_compute/runtime/RuntimeContext.h"
 
-#include "arm_compute/runtime/CPP/CPPScheduler.h"
 #include "arm_compute/runtime/NEON/functions/NEActivationLayer.h"
+#include "arm_compute/runtime/SchedulerFactory.h"
 #include "arm_compute/runtime/Tensor.h"
 #include "support/ToolchainSupport.h"
 #include "tests/Globals.h"
@@ -61,9 +61,9 @@
     ARM_COMPUTE_EXPECT(ctx.scheduler() != nullptr, framework::LogLevel::ERRORS);
     ARM_COMPUTE_EXPECT(ctx.asset_manager() == nullptr, framework::LogLevel::ERRORS);
 
-    // Create a CPPScheduler
-    CPPScheduler scheduler;
-    ctx.set_scheduler(&scheduler);
+    // Create a Scheduler
+    auto scheduler = SchedulerFactory::create();
+    ctx.set_scheduler(scheduler.get());
     // Check if the scheduler has been properly setup
     ARM_COMPUTE_EXPECT(ctx.scheduler() != nullptr, framework::LogLevel::ERRORS);