浏览代码

ENH: fix win64 build and a warning

Bill Hoffman 18 年之前
父节点
当前提交
32409bb8e3
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7 4
      Source/kwsys/SystemInformation.cxx

+ 7 - 4
Source/kwsys/SystemInformation.cxx

@@ -801,7 +801,7 @@ bool SystemInformationImplementation::DoesCPUSupportCPUID()
 {
 {
   int CPUIDPresent = 0;
   int CPUIDPresent = 0;
 
 
-#if defined(_MSC_VER) && (_MSC_VER >= 1300)
+#if USE_ASM_INSTRUCTIONS
   // Use SEH to determine CPUID presence
   // Use SEH to determine CPUID presence
     __try {
     __try {
         _asm {
         _asm {
@@ -842,7 +842,7 @@ bool SystemInformationImplementation::DoesCPUSupportCPUID()
 
 
 bool SystemInformationImplementation::RetrieveCPUFeatures()
 bool SystemInformationImplementation::RetrieveCPUFeatures()
 {
 {
-#if defined(_MSC_VER) && (_MSC_VER >= 1300)
+#if USE_ASM_INSTRUCTIONS
   int localCPUFeatures = 0;
   int localCPUFeatures = 0;
   int localCPUAdvanced = 0;
   int localCPUAdvanced = 0;
 
 
@@ -2761,7 +2761,7 @@ kwsys_stl::string SystemInformationImplementation::RunProcess(kwsys_stl::vector<
     }
     }
   kwsysProcess_WaitForExit(gp, 0);
   kwsysProcess_WaitForExit(gp, 0);
 
 
-  int result = 1;
+  int result = 0;
   switch(kwsysProcess_GetState(gp))
   switch(kwsysProcess_GetState(gp))
     {
     {
     case kwsysProcess_State_Exited:
     case kwsysProcess_State_Exited:
@@ -2790,7 +2790,10 @@ kwsys_stl::string SystemInformationImplementation::RunProcess(kwsys_stl::vector<
       } break;
       } break;
     }
     }
   kwsysProcess_Delete(gp);
   kwsysProcess_Delete(gp);
-  (void)result;
+  if(result)
+    {
+    kwsys_ios::cerr << "Error " << args[0] << " returned :" << result << "\n";
+    }
   return buffer;
   return buffer;
 }
 }