summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt McCormick <matt.mccormick@kitware.com>2015-07-29 18:46:40 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-03 13:21:39 (GMT)
commit623dcc85a447b9ce0f09cffa8cd296cd8a51ad9d (patch)
tree377d951584bf7a64ff9420f695eb634b2d7aee8c
parent22b8f23849a8996c921332b3689405b967eaaa6e (diff)
downloadCMake-623dcc85a447b9ce0f09cffa8cd296cd8a51ad9d.zip
CMake-623dcc85a447b9ce0f09cffa8cd296cd8a51ad9d.tar.gz
CMake-623dcc85a447b9ce0f09cffa8cd296cd8a51ad9d.tar.bz2
ExternalProject: Avoid if() auto-dereference of a "TEST" variable
Exposed by CMP0054 warnings.
-rw-r--r--Modules/ExternalProject.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index f6844be..fdb146a 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1211,7 +1211,7 @@ function(_ep_get_build_command name step cmd_var)
if(step STREQUAL "INSTALL")
set(args install)
endif()
- if(step STREQUAL "TEST")
+ if("x${step}x" STREQUAL "xTESTx")
set(args test)
endif()
else()
@@ -1230,7 +1230,7 @@ function(_ep_get_build_command name step cmd_var)
list(APPEND args --target install)
endif()
# But for "TEST" drive the project with corresponding "ctest".
- if(step STREQUAL "TEST")
+ if("x${step}x" STREQUAL "xTESTx")
string(REGEX REPLACE "^(.*/)cmake([^/]*)$" "\\1ctest\\2" cmd "${cmd}")
set(args "")
endif()
@@ -1246,7 +1246,7 @@ function(_ep_get_build_command name step cmd_var)
if(step STREQUAL "INSTALL")
set(args install)
endif()
- if(step STREQUAL "TEST")
+ if("x${step}x" STREQUAL "xTESTx")
set(args test)
endif()
endif()