Fix CMP0054 cmake 3.1.0 warnings
[alexxy/gromacs.git] / cmake / gmxCustomCommandUtilities.cmake
index 3a13396e628fe1f496b5707967c3c254c1d2bea4..ae3279a8317d9e5a9d8048d0356adde3589fd2b4 100644 (file)
@@ -179,7 +179,7 @@ function (gmx_add_custom_output_target targetname)
         elseif ("x${_arg}" MATCHES "^x(COMMAND|COMMENT|WORKING_DIRECTORY)$")
             set(_option "PASS")
             list(APPEND _command_args "${_arg}")
-        elseif ("${_option}" STREQUAL "DEPENDS")
+        elseif ("x${_option}" STREQUAL "xDEPENDS")
             list(APPEND _deps "${_arg}")
             # If the dependency is a target created with this command, also add
             # the output file as a dependency.
@@ -190,15 +190,15 @@ function (gmx_add_custom_output_target targetname)
                     list(APPEND _deps ${_target_output})
                 endif()
             endif()
-        elseif ("${_option}" STREQUAL "PASS")
+        elseif ("x${_option}" STREQUAL "xPASS")
             list(APPEND _command_args "${_arg}")
-        elseif ("${_option}" STREQUAL "DEPENDS_FILE_LIST")
+        elseif ("x${_option}" STREQUAL "xDEPENDS_FILE_LIST")
             list(APPEND _deps ${${_arg}})
-        elseif ("${_option}" STREQUAL "OUTPUT")
+        elseif ("x${_option}" STREQUAL "xOUTPUT")
             if (_output)
                 message(FATAL_ERROR "Multiple OUTPUTs not supported")
             endif()
-            if ("${_arg}" STREQUAL "STAMP")
+            if ("x${_arg}" STREQUAL "xSTAMP")
                 gmx_get_stamp_filename(_output ${targetname})
                 set(_stamp ON)
             else()