summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-29 13:21:35 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-09-29 13:21:35 (GMT)
commit87dfc907cfe762a49bde172423a2dd21e13d7ac1 (patch)
tree7472ce72b74bf38652e6824561ca2048e7be4742
parent693c20df769b20e377460ef3adb5aa7ab8f9bc68 (diff)
parent84e3fde94db9dfa2f3fb10a85c5db6c9a78124ab (diff)
downloadCMake-87dfc907cfe762a49bde172423a2dd21e13d7ac1.zip
CMake-87dfc907cfe762a49bde172423a2dd21e13d7ac1.tar.gz
CMake-87dfc907cfe762a49bde172423a2dd21e13d7ac1.tar.bz2
Merge topic 'FindCUDA-cleanup-CMP0054'
84e3fde9 FindCUDA: Avoid if() auto-dereference in string comparisons
-rw-r--r--Modules/FindCUDA.cmake14
-rw-r--r--Modules/FindCUDA/run_nvcc.cmake2
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)