summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-22 18:05:23 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-22 18:09:37 (GMT)
commit705ae0049190dfa9e79e13c423c509b112a5e25b (patch)
tree1ee3ddb7081fe0f1cfbd94e22daab84ae83e452a /Modules/CMakeDetermineCompilerId.cmake
parent18a253732db75afb713ce1bdd07d593780a4590b (diff)
downloadCMake-705ae0049190dfa9e79e13c423c509b112a5e25b.zip
CMake-705ae0049190dfa9e79e13c423c509b112a5e25b.tar.gz
CMake-705ae0049190dfa9e79e13c423c509b112a5e25b.tar.bz2
Quote ${CMAKE_<LANG>_COMPILER} while enabling a language
Even though this variable gets set to CMAKE_<LANG>_COMPILER-NOTFOUND when the compiler is not found, CMake<LANG>Compiler.cmake gets removed by cmGlobalGenerator::EnableLanguage so in try compiles the value is empty. Quote references to the variable in Modules/CMake(C|CXX|Fortran)Information.cmake Modules/CMakeDetermineCompilerId.cmake to avoid dropping arguments from commands that expect them.
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index bb260f6..6fccb16 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -232,7 +232,7 @@ Id flags: ${testflags}
else()
if(COMMAND EXECUTE_PROCESS)
execute_process(
- COMMAND ${CMAKE_${lang}_COMPILER}
+ COMMAND "${CMAKE_${lang}_COMPILER}"
${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${testflags}
@@ -244,7 +244,7 @@ Id flags: ${testflags}
)
else()
exec_program(
- ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_DIR}
+ "${CMAKE_${lang}_COMPILER}" ${CMAKE_${lang}_COMPILER_ID_DIR}
ARGS ${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${testflags}
@@ -476,7 +476,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
set(flags ${CMAKE_${lang}_COMPILER_ID_VENDOR_FLAGS_${vendor}})
set(regex ${CMAKE_${lang}_COMPILER_ID_VENDOR_REGEX_${vendor}})
execute_process(
- COMMAND ${CMAKE_${lang}_COMPILER}
+ COMMAND "${CMAKE_${lang}_COMPILER}"
${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${flags}