Parcourir la source

Merge topic 'WCDH-CMP0054-safety'

65e6b115 WCDH: Fix condition when variables named "FILE" or "PREFIX" are defined
Brad King il y a 10 ans
Parent
commit
715b3edf7d
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      Modules/WriteCompilerDetectionHeader.cmake

+ 2 - 2
Modules/WriteCompilerDetectionHeader.cmake

@@ -246,10 +246,10 @@ function(write_compiler_detection_header
     file_keyword file_arg
     prefix_keyword prefix_arg
     )
-  if (NOT file_keyword STREQUAL FILE)
+  if (NOT "x${file_keyword}" STREQUAL "xFILE")
     message(FATAL_ERROR "write_compiler_detection_header: FILE parameter missing.")
   endif()
-  if (NOT prefix_keyword STREQUAL PREFIX)
+  if (NOT "x${prefix_keyword}" STREQUAL "xPREFIX")
     message(FATAL_ERROR "write_compiler_detection_header: PREFIX parameter missing.")
   endif()
   set(options)