Fixed string var expansion in CMake due to CMP0053
[alexxy/gromacs.git] / cmake / gmxDetectSimd.cmake
index 447ce66782b10e70f193007b61b2d253f61d6e57..a2ac397c4c919699fd7e10df08ed42ff91ece3a7 100644 (file)
@@ -62,7 +62,7 @@ function(gmx_suggest_x86_simd _suggested_simd)
     message(STATUS "Detecting best SIMD instructions for this CPU")
 
     # Get CPU SIMD properties information
-    set(_compile_definitions "@GCC_INLINE_ASM_DEFINE@ -I${CMAKE_SOURCE_DIR}/src/gromacs/legacyheaders -DGMX_CPUID_STANDALONE")
+    set(_compile_definitions "${GCC_INLINE_ASM_DEFINE} -I${CMAKE_SOURCE_DIR}/src/gromacs/legacyheaders -DGMX_CPUID_STANDALONE")
     if(GMX_TARGET_X86)
         set(_compile_definitions "${_compile_definitions} -DGMX_TARGET_X86")
     endif()
@@ -84,10 +84,10 @@ function(gmx_suggest_x86_simd _suggested_simd)
         set(OUTPUT_TMP "None")
     endif(NOT GMX_CPUID_COMPILED)
 
-    string(STRIP "@OUTPUT_TMP@" OUTPUT_SIMD)
+    string(STRIP "${OUTPUT_TMP}" OUTPUT_SIMD)
 
-    set(${_suggested_simd} "@OUTPUT_SIMD@" PARENT_SCOPE)
-    message(STATUS "Detected best SIMD instructions for this CPU - @OUTPUT_SIMD@")
+    set(${_suggested_simd} "${OUTPUT_SIMD}" PARENT_SCOPE)
+    message(STATUS "Detected best SIMD instructions for this CPU - ${OUTPUT_SIMD}")
 endfunction()
 
 function(gmx_detect_simd _suggested_simd)