expand ifdefs to remove include file dependencies
authorBen Ashbaugh <ben.ashbaugh@intel.com>
Thu, 30 Apr 2020 14:29:14 +0000 (07:29 -0700)
committerAlastair Murray <alastairmurray42@gmail.com>
Fri, 8 May 2020 22:01:40 +0000 (23:01 +0100)
loader/windows/icd_windows_apppackage.cpp

index a8a0faa..96a0bb2 100644 (file)
@@ -22,6 +22,16 @@ extern "C"
 #include "icd_windows.h"
 }
 
+#ifdef OPENCL_ICD_LOADER_DISABLE_OPENCLON12
+
+extern "C" bool khrIcdOsVendorsEnumerateAppPackage()
+{
+    KHR_ICD_TRACE("OpenCLOn12 is disabled\n");
+    return false;
+}
+
+#else
+
 #include "icd_windows_apppackage.h"
 
 #include <windows.management.deployment.h>
@@ -48,10 +58,6 @@ using namespace Microsoft::WRL::Wrappers;
 
 extern "C" bool khrIcdOsVendorsEnumerateAppPackage()
 {
-#ifdef OPENCL_ICD_LOADER_DISABLE_OPENCLON12
-    KHR_ICD_TRACE("OpenCLOn12 is disabled\n");
-    return false;
-#else
     HRESULT hrInit = Windows::Foundation::Initialize(RO_INIT_MULTITHREADED);
     if (hrInit == RPC_E_CHANGED_MODE)
     {
@@ -168,5 +174,6 @@ extern "C" bool khrIcdOsVendorsEnumerateAppPackage()
         return true;
     }
     return false;
+}
+
 #endif
-}
\ No newline at end of file