Browse Source

QNX: Fix detection of QCC compiler id (#15349)

In commit v3.1.0-rc1~113^2 (Use a more reliable regex for extracting
binary INFO strings, 2014-09-03) the matching of INFO: strings was made
more strict and no longer matches just "INFO:qnxnto".  Use
"INFO:qnxnto[]" instead to conform to the new pattern.
Brad King 10 years ago
parent
commit
9c9bc71256

+ 1 - 1
Modules/CMakeCCompilerId.c.in

@@ -18,7 +18,7 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
 #endif
 #endif
 
 
 #ifdef __QNXNTO__
 #ifdef __QNXNTO__
-char const* qnxnto = "INFO" ":" "qnxnto";
+char const* qnxnto = "INFO" ":" "qnxnto[]";
 #endif
 #endif
 
 
 @CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
 @CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@

+ 1 - 1
Modules/CMakeCXXCompilerId.cpp.in

@@ -17,7 +17,7 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
 #endif
 #endif
 
 
 #ifdef __QNXNTO__
 #ifdef __QNXNTO__
-char const* qnxnto = "INFO" ":" "qnxnto";
+char const* qnxnto = "INFO" ":" "qnxnto[]";
 #endif
 #endif
 
 
 @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
 @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@

+ 1 - 1
Modules/CMakeDetermineCompilerId.cmake

@@ -445,7 +445,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
         string(REGEX REPLACE "^0+([0-9])" "\\1" SIMULATE_VERSION "${CMAKE_MATCH_1}")
         string(REGEX REPLACE "^0+([0-9])" "\\1" SIMULATE_VERSION "${CMAKE_MATCH_1}")
         string(REGEX REPLACE "\\.0+([0-9])" ".\\1" SIMULATE_VERSION "${SIMULATE_VERSION}")
         string(REGEX REPLACE "\\.0+([0-9])" ".\\1" SIMULATE_VERSION "${SIMULATE_VERSION}")
       endif()
       endif()
-      if("${info}" MATCHES "INFO:qnxnto")
+      if("${info}" MATCHES "INFO:qnxnto\\[\\]")
         set(COMPILER_QNXNTO 1)
         set(COMPILER_QNXNTO 1)
       endif()
       endif()
     endforeach()
     endforeach()