summaryrefslogtreecommitdiff
path: root/Modules/CMakeDetermineVSServicePack.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-18 11:43:37 -0500
committerBrad King <brad.king@kitware.com>2019-02-19 07:29:27 -0500
commitb186329d3db0083d77e61ded709f4e70a596631d (patch)
treeb90765bf6de27c0ed51a846aaba8529e9eadaa59 /Modules/CMakeDetermineVSServicePack.cmake
parente6897c72e7c59f7a0b82ed19c1bdb40d42f7adaa (diff)
downloadcmake-b186329d3db0083d77e61ded709f4e70a596631d.tar.gz
Use -? instead of /? to test compiler for MSVC-like command-line support
MS-style command-line tools accept either `/` or `-` for command-line options. Prefer `-` over `/` so that non-MS tools do not treat it as a path. Fixes: #18941
Diffstat (limited to 'Modules/CMakeDetermineVSServicePack.cmake')
-rw-r--r--Modules/CMakeDetermineVSServicePack.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineVSServicePack.cmake b/Modules/CMakeDetermineVSServicePack.cmake
index 9edc309a04..a3c4d9cf1d 100644
--- a/Modules/CMakeDetermineVSServicePack.cmake
+++ b/Modules/CMakeDetermineVSServicePack.cmake
@@ -79,7 +79,7 @@ endfunction()
function(_DetermineVSServicePack_FastCheckVersionWithCompiler _SUCCESS_VAR _VERSION_VAR)
if(EXISTS ${CMAKE_CXX_COMPILER})
execute_process(
- COMMAND ${CMAKE_CXX_COMPILER} /?
+ COMMAND ${CMAKE_CXX_COMPILER} -?
ERROR_VARIABLE _output
OUTPUT_QUIET
)