diff options
author | Adam Strzelecki <ono@java.pl> | 2014-09-17 11:54:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-09-24 14:10:42 (GMT) |
commit | 84e3fde94db9dfa2f3fb10a85c5db6c9a78124ab (patch) | |
tree | 07208d6b3698645556376aaad0862bc8ec6237da | |
parent | 17a457dcb02e351efe5d1dd093c9443ba206667a (diff) | |
download | CMake-84e3fde94db9dfa2f3fb10a85c5db6c9a78124ab.zip CMake-84e3fde94db9dfa2f3fb10a85c5db6c9a78124ab.tar.gz CMake-84e3fde94db9dfa2f3fb10a85c5db6c9a78124ab.tar.bz2 |
FindCUDA: Avoid if() auto-dereference in string comparisons
This silences possible CMP0054 warnings.
-rw-r--r-- | Modules/FindCUDA.cmake | 14 | ||||
-rw-r--r-- | Modules/FindCUDA/run_nvcc.cmake | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 9348aa5..2e2b21c 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -894,15 +894,15 @@ macro(CUDA_GET_SOURCES_AND_OPTIONS _sources _cmake_options _options) set( ${_options} ) set( _found_options FALSE ) foreach(arg ${ARGN}) - if(arg STREQUAL "OPTIONS") + if("x${arg}" STREQUAL "xOPTIONS") set( _found_options TRUE ) elseif( - arg STREQUAL "WIN32" OR - arg STREQUAL "MACOSX_BUNDLE" OR - arg STREQUAL "EXCLUDE_FROM_ALL" OR - arg STREQUAL "STATIC" OR - arg STREQUAL "SHARED" OR - arg STREQUAL "MODULE" + "x${arg}" STREQUAL "xWIN32" OR + "x${arg}" STREQUAL "xMACOSX_BUNDLE" OR + "x${arg}" STREQUAL "xEXCLUDE_FROM_ALL" OR + "x${arg}" STREQUAL "xSTATIC" OR + "x${arg}" STREQUAL "xSHARED" OR + "x${arg}" STREQUAL "xMODULE" ) list(APPEND ${_cmake_options} ${arg}) else() diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake index 58e0d31..abdd307 100644 --- a/Modules/FindCUDA/run_nvcc.cmake +++ b/Modules/FindCUDA/run_nvcc.cmake @@ -126,7 +126,7 @@ endif() # and other return variables are present after executing the process. macro(cuda_execute_process status command) set(_command ${command}) - if(NOT _command STREQUAL "COMMAND") + if(NOT "x${_command}" STREQUAL "xCOMMAND") message(FATAL_ERROR "Malformed call to cuda_execute_process. Missing COMMAND as second argument. (command = ${command})") endif() if(verbose) |