Check that gmx_detectcpu runs correctly
authorRoland Schulz <roland@utk.edu>
Wed, 5 Sep 2012 10:04:00 +0000 (06:04 -0400)
committerRoland Schulz <roland@utk.edu>
Wed, 5 Sep 2012 10:04:00 +0000 (06:04 -0400)
If it doesn't run correctly set acceleration to None and
print warning. Same as check whether it compiled, which already
existed.

Change-Id: I59a2d531c41f931d162725540d5483b39aa7a3df

cmake/gmxDetectAcceleration.cmake

index dbe18b242877da413a98e5d0121cce012dd5fc89..9e719a92fee665a2dba828d2bccece1e36be5a94 100644 (file)
@@ -37,6 +37,10 @@ macro(gmx_detect_acceleration GMX_SUGGESTED_ACCELERATION)
         message(WARNING "Cannot compile CPU detection code, which means no optimization.")
         message(STATUS "Compile output: ${GMX_DETECTCPU_COMPILE_OUTPUT}")
         set(OUTPUT_TMP "None")
+    elseif(NOT GMX_DETECTCPU_RUN_ACC EQUAL 0)
+        message(WARNING "Cannot run CPU detection code, which means no optimization.")
+        message(STATUS "Run output: ${OUTPUT_TMP}")
+        set(OUTPUT_TMP "None")
     endif(NOT GMX_DETECTCPU_COMPILED)
 
     string(STRIP "@OUTPUT_TMP@" OUTPUT_ACC)