From: Roland Schulz Date: Tue, 28 Oct 2014 21:49:08 +0000 (-0400) Subject: Fix CMP0054 cmake 3.1.0 warnings X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=320025f2524d17605a47bd6a1db563efecc63147;p=alexxy%2Fgromacs.git Fix CMP0054 cmake 3.1.0 warnings Change-Id: I5d91289a543240fa6f493b7f7738522f3c268c07 --- diff --git a/cmake/gmxCustomCommandUtilities.cmake b/cmake/gmxCustomCommandUtilities.cmake index 3a13396e62..ae3279a831 100644 --- a/cmake/gmxCustomCommandUtilities.cmake +++ b/cmake/gmxCustomCommandUtilities.cmake @@ -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() diff --git a/cmake/gmxOptionUtilities.cmake b/cmake/gmxOptionUtilities.cmake index 603f3c5cfd..ca1fac39a0 100644 --- a/cmake/gmxOptionUtilities.cmake +++ b/cmake/gmxOptionUtilities.cmake @@ -107,7 +107,7 @@ function(GMX_OPTION_TRIVALUE NAME DESCRIPTION DEFAULT) set(${NAME}_AUTO OFF) set(${NAME}_FORCE OFF) string(TOUPPER "${${NAME}}" ${NAME}) - if ("${NAME}" STREQUAL "AUTO") + if ("${${NAME}}" STREQUAL "AUTO") set(${NAME}_AUTO ON) elseif (${NAME}) set(${NAME}_FORCE ON) @@ -199,7 +199,7 @@ endmacro() function(GMX_CHECK_IF_CHANGED RESULT) set(_result FALSE) foreach (_var ${ARGN}) - if (NOT "${_var}" STREQUAL "${_var}_PREVIOUS_VALUE") + if (NOT "${${_var}}" STREQUAL "${${_var}_PREVIOUS_VALUE}") set(_result TRUE) endif() set(${_var}_PREVIOUS_VALUE "${${_var}}" CACHE INTERNAL