Attached Files | binary_dir_quoting_fix.diff [^] (21,634 bytes) 2014-08-10 16:53 [Show Content] [Hide Content]diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 3847b75..4583874 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -168,7 +168,7 @@ endif()
# configure variables set in this file for fast reload later on
configure_file(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
- ${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake
+ "${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake"
@ONLY
)
set(CMAKE_C_COMPILER_ENV_VAR "CC")
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index e6a9d9a..2da6763 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -166,7 +166,7 @@ endif()
# configure all variables set in this file
configure_file(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
- ${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake
+ "${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake"
@ONLY
)
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index 8595b97..0421461 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -29,7 +29,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
set(CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}")
endif()
try_compile(CMAKE_${lang}_ABI_COMPILED
- ${CMAKE_BINARY_DIR} ${src}
+ "${CMAKE_BINARY_DIR}" "${src}"
CMAKE_FLAGS "${CMAKE_FLAGS}"
"-DCMAKE_${lang}_STANDARD_LIBRARIES="
# We need ignore these warnings because some platforms need
@@ -48,7 +48,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Load the resulting information strings.
if(CMAKE_${lang}_ABI_COMPILED AND NOT _copy_error)
message(STATUS "Detecting ${lang} compiler ABI info - done")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n")
file(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 2 REGEX "INFO:[^[]*\\[")
foreach(info ${ABI_STRINGS})
@@ -77,7 +77,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
if(CMAKE_${lang}_VERBOSE_FLAG)
CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs implicit_fwks log
"${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"Parsed ${lang} implicit link information from above output:\n${log}\n\n")
endif()
# for VS IDE Intel Fortran we have to figure out the
@@ -89,7 +89,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
message(STATUS "${_desc}")
# Build a sample project which reports symbols.
try_compile(IFORT_LIB_PATH_COMPILED
- ${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath
+ "${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath"
${CMAKE_ROOT}/Modules/IntelVSImplicitPath
IntelFortranImplicit
CMAKE_FLAGS
@@ -98,7 +98,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
file(WRITE
"${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.txt"
"${_output}")
- include(${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.cmake OPTIONAL)
+ include("${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.cmake" OPTIONAL)
set(_desc "Determine Intel Fortran Compiler Implicit Link Path -- done")
message(STATUS "${_desc}")
endif()
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 025d296..97b26a8 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -30,7 +30,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
string(REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
# Compute the directory in which to run the test.
- set(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_PLATFORM_INFO_DIR}/CompilerId${lang})
+ set(CMAKE_${lang}_COMPILER_ID_DIR "${CMAKE_PLATFORM_INFO_DIR}/CompilerId${lang}")
# Try building with no extra flags and then try each set
# of helper flags. Stop when the compiler is identified.
@@ -113,7 +113,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_WRITE lang src)
unset(src_in CACHE)
string(CONFIGURE "${ID_CONTENT_IN}" ID_CONTENT_OUT @ONLY)
- file(WRITE ${CMAKE_${lang}_COMPILER_ID_DIR}/${src} "${ID_CONTENT_OUT}")
+ file(WRITE "${CMAKE_${lang}_COMPILER_ID_DIR}/${src}" "${ID_CONTENT_OUT}")
endfunction()
#-----------------------------------------------------------------------------
@@ -121,8 +121,8 @@ endfunction()
# files.
function(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src)
# Create a clean working directory.
- file(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
- file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
+ file(REMOVE_RECURSE "${CMAKE_${lang}_COMPILER_ID_DIR}")
+ file(MAKE_DIRECTORY "${CMAKE_${lang}_COMPILER_ID_DIR}")
CMAKE_DETERMINE_COMPILER_ID_WRITE("${lang}" "${src}")
# Construct a description of this test case.
@@ -178,7 +178,7 @@ Id flags: ${testflags}
else()
set(id_subsystem 1)
endif()
- set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR})
+ set(id_dir "${CMAKE_${lang}_COMPILER_ID_DIR}")
get_filename_component(id_src "${src}" NAME)
configure_file(${CMAKE_ROOT}/Modules/CompilerId/VS-${v}.${ext}.in
${id_dir}/CompilerId${lang}.${ext} @ONLY)
@@ -196,7 +196,7 @@ Id flags: ${testflags}
if(command)
execute_process(
COMMAND ${command}
- WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
+ WORKING_DIRECTORY "${CMAKE_${lang}_COMPILER_ID_DIR}"
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT
@@ -217,7 +217,7 @@ Id flags: ${testflags}
elseif("${CMAKE_GENERATOR}" MATCHES "Xcode")
set(id_lang "${lang}")
set(id_type ${CMAKE_${lang}_COMPILER_XCODE_TYPE})
- set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR})
+ set(id_dir "${CMAKE_${lang}_COMPILER_ID_DIR}")
get_filename_component(id_src "${src}" NAME)
if(CMAKE_XCODE_PLATFORM_TOOLSET)
set(id_toolset "GCC_VERSION = ${CMAKE_XCODE_PLATFORM_TOOLSET};")
@@ -253,7 +253,7 @@ Id flags: ${testflags}
set(ENV{MACOSX_DEPLOYMENT_TARGET} "")
endif()
execute_process(COMMAND xcodebuild
- WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
+ WORKING_DIRECTORY "${CMAKE_${lang}_COMPILER_ID_DIR}"
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT
@@ -281,7 +281,7 @@ Id flags: ${testflags}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${testflags}
"${src}"
- WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
+ WORKING_DIRECTORY "${CMAKE_${lang}_COMPILER_ID_DIR}"
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT
@@ -313,7 +313,7 @@ ${CMAKE_${lang}_COMPILER_ID_RESULT}
${CMAKE_${lang}_COMPILER_ID_OUTPUT}
")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "${MSG}")
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log" "${MSG}")
#if(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
# message(FATAL_ERROR "${MSG}")
#endif()
@@ -322,7 +322,7 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
set(COMPILER_${lang}_PRODUCED_FILES)
else()
# Compilation succeeded.
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"Compiling the ${lang} compiler identification source file \"${src}\" succeeded.
${COMPILER_DESCRIPTION}
The output was:
@@ -334,14 +334,14 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
# Find the executable produced by the compiler, try all files in the
# binary dir.
file(GLOB files
- RELATIVE ${CMAKE_${lang}_COMPILER_ID_DIR}
- ${CMAKE_${lang}_COMPILER_ID_DIR}/*)
+ RELATIVE "${CMAKE_${lang}_COMPILER_ID_DIR}"
+ "${CMAKE_${lang}_COMPILER_ID_DIR}/*")
list(REMOVE_ITEM files "${src}")
set(COMPILER_${lang}_PRODUCED_FILES "")
foreach(file ${files})
- if(NOT IS_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}/${file})
+ if(NOT IS_DIRECTORY "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}")
list(APPEND COMPILER_${lang}_PRODUCED_FILES ${file})
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"Compilation of the ${lang} compiler identification source \""
"${src}\" produced \"${file}\"\n\n")
endif()
@@ -349,7 +349,7 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
if(NOT COMPILER_${lang}_PRODUCED_FILES)
# No executable was found.
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"Compilation of the ${lang} compiler identification source \""
"${src}\" did not produce an executable in \""
"${CMAKE_${lang}_COMPILER_ID_DIR}\".\n\n")
@@ -372,7 +372,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
set(ARCHITECTURE_ID)
set(SIMULATE_ID)
set(SIMULATE_VERSION)
- file(STRINGS ${file}
+ file(STRINGS "${file}"
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 6 REGEX "INFO:")
set(COMPILER_ID_TWICE)
foreach(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
@@ -407,7 +407,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
# Detect the exact architecture from the PE header.
if(WIN32)
# The offset to the PE signature is stored at 0x3c.
- file(READ ${file} peoffsethex LIMIT 1 OFFSET 60 HEX)
+ file(READ "${file}" peoffsethex LIMIT 1 OFFSET 60 HEX)
string(SUBSTRING "${peoffsethex}" 0 1 peoffsethex1)
string(SUBSTRING "${peoffsethex}" 1 1 peoffsethex2)
set(peoffsetexpression "${peoffsethex1} * 16 + ${peoffsethex2}")
@@ -419,7 +419,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
string(REPLACE "f" "15" peoffsetexpression "${peoffsetexpression}")
math(EXPR peoffset "${peoffsetexpression}")
- file(READ ${file} peheader LIMIT 6 OFFSET ${peoffset} HEX)
+ file(READ "${file}" peheader LIMIT 6 OFFSET ${peoffset} HEX)
if(peheader STREQUAL "50450000a201")
set(ARCHITECTURE_ID "SH3")
elseif(peheader STREQUAL "50450000a301")
@@ -446,12 +446,12 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
# Check the compiler identification string.
if(CMAKE_${lang}_COMPILER_ID)
# The compiler identification was found.
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"The ${lang} compiler identification is ${CMAKE_${lang}_COMPILER_ID}, found in \""
"${file}\"\n\n")
else()
# The compiler identification could not be found.
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"The ${lang} compiler identification could not be found in \""
"${file}\"\n\n")
endif()
@@ -459,7 +459,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
# try to figure out the executable format: ELF, COFF, Mach-O
if(NOT CMAKE_EXECUTABLE_FORMAT)
- file(READ ${file} CMAKE_EXECUTABLE_MAGIC LIMIT 4 HEX)
+ file(READ "${file}" CMAKE_EXECUTABLE_MAGIC LIMIT 4 HEX)
# ELF files start with 0x7f"ELF"
if("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46")
@@ -509,9 +509,9 @@ function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
# We get here when this function is called not from within CMAKE_DETERMINE_COMPILER_ID()
# This is done e.g. for detecting the compiler ID for assemblers.
# Compute the directory in which to run the test and Create a clean working directory.
- set(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_PLATFORM_INFO_DIR}/CompilerId${lang})
- file(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
- file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
+ set(CMAKE_${lang}_COMPILER_ID_DIR "${CMAKE_PLATFORM_INFO_DIR}/CompilerId${lang}")
+ file(REMOVE_RECURSE "${CMAKE_${lang}_COMPILER_ID_DIR}")
+ file(MAKE_DIRECTORY "${CMAKE_${lang}_COMPILER_ID_DIR}")
endif()
@@ -523,25 +523,25 @@ function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
${flags}
- WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
+ WORKING_DIRECTORY "${CMAKE_${lang}_COMPILER_ID_DIR}"
OUTPUT_VARIABLE output ERROR_VARIABLE output
RESULT_VARIABLE result
TIMEOUT 10
)
if("${output}" MATCHES "${regex}")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
"matched \"${regex}\":\n${output}")
set(CMAKE_${lang}_COMPILER_ID "${vendor}" PARENT_SCOPE)
break()
else()
if("${result}" MATCHES "timeout")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
"terminated after 10 s due to timeout.")
else()
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
"did not match \"${regex}\":\n${output}")
endif()
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index 1c0941a..235eda1 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -167,12 +167,12 @@ ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_HOST_SYSTEM)
if(CMAKE_BINARY_DIR)
# write entry to the log file
if(PRESET_CMAKE_SYSTEM_NAME)
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"The target system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"The host system is: ${CMAKE_HOST_SYSTEM_NAME} - ${CMAKE_HOST_SYSTEM_VERSION} - ${CMAKE_HOST_SYSTEM_PROCESSOR}\n")
else()
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"The system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
endif()
@@ -185,7 +185,7 @@ if(CMAKE_BINARY_DIR)
# configure variables set in this file for fast reload, the template file is defined at the top of this file
configure_file(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
- ${CMAKE_PLATFORM_INFO_DIR}/CMakeSystem.cmake
+ "${CMAKE_PLATFORM_INFO_DIR}/CMakeSystem.cmake"
@ONLY)
endif()
diff --git a/Modules/CMakeFindPackageMode.cmake b/Modules/CMakeFindPackageMode.cmake
index 9f97ee5..a32f5e1 100644
--- a/Modules/CMakeFindPackageMode.cmake
+++ b/Modules/CMakeFindPackageMode.cmake
@@ -56,7 +56,7 @@ macro(ENABLE_LANGUAGE)
# But in --find-package mode, we don't want (and can't) enable any language.
endmacro()
-set(CMAKE_PLATFORM_INFO_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
+set(CMAKE_PLATFORM_INFO_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}")
include(CMakeDetermineSystem)
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index 29a58bd..bba7955 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -32,7 +32,7 @@ unset(CMAKE_C_COMPILER_WORKS CACHE)
# any makefiles or projects.
if(NOT CMAKE_C_COMPILER_WORKS)
PrintTestCompilerStatus("C" "")
- file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
+ file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c"
"#ifdef __cplusplus\n"
"# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n"
"#endif\n"
@@ -44,8 +44,8 @@ if(NOT CMAKE_C_COMPILER_WORKS)
"int main(int argc, char* argv[])\n"
"#endif\n"
"{ (void)argv; return argc-1;}\n")
- try_compile(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
+ try_compile(CMAKE_C_COMPILER_WORKS "${CMAKE_BINARY_DIR}"
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c"
OUTPUT_VARIABLE __CMAKE_C_COMPILER_OUTPUT)
# Move result from cache to normal variable.
set(CMAKE_C_COMPILER_WORKS ${CMAKE_C_COMPILER_WORKS})
@@ -55,7 +55,7 @@ endif()
if(NOT CMAKE_C_COMPILER_WORKS)
PrintTestCompilerStatus("C" " -- broken")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"Determining if the C compiler works failed with "
"the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n")
message(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" "
@@ -65,7 +65,7 @@ if(NOT CMAKE_C_COMPILER_WORKS)
else()
if(C_TEST_WAS_RUN)
PrintTestCompilerStatus("C" " -- works")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"Determining if the C compiler works passed with "
"the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n")
endif()
@@ -80,10 +80,10 @@ else()
# Re-configure to save learned information.
configure_file(
${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
- ${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake
+ "${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake"
@ONLY
)
- include(${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake)
+ include("${CMAKE_PLATFORM_INFO_DIR}/CMakeCCompiler.cmake")
if(CMAKE_C_SIZEOF_DATA_PTR)
foreach(f ${CMAKE_C_ABI_FILES})
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index 81561b2..cb4507a 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -32,13 +32,13 @@ unset(CMAKE_CXX_COMPILER_WORKS CACHE)
# any makefiles or projects.
if(NOT CMAKE_CXX_COMPILER_WORKS)
PrintTestCompilerStatus("CXX" "")
- file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
+ file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx"
"#ifndef __cplusplus\n"
"# error \"The CMAKE_CXX_COMPILER is set to a C compiler\"\n"
"#endif\n"
"int main(){return 0;}\n")
- try_compile(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
+ try_compile(CMAKE_CXX_COMPILER_WORKS "${CMAKE_BINARY_DIR}"
+ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx"
OUTPUT_VARIABLE __CMAKE_CXX_COMPILER_OUTPUT)
# Move result from cache to normal variable.
set(CMAKE_CXX_COMPILER_WORKS ${CMAKE_CXX_COMPILER_WORKS})
@@ -48,7 +48,7 @@ endif()
if(NOT CMAKE_CXX_COMPILER_WORKS)
PrintTestCompilerStatus("CXX" " -- broken")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"Determining if the CXX compiler works failed with "
"the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n")
message(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" "
@@ -58,7 +58,7 @@ if(NOT CMAKE_CXX_COMPILER_WORKS)
else()
if(CXX_TEST_WAS_RUN)
PrintTestCompilerStatus("CXX" " -- works")
- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"Determining if the CXX compiler works passed with "
"the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n")
endif()
@@ -73,10 +73,10 @@ else()
# Re-configure to save learned information.
configure_file(
${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
- ${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake
+ "${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake"
@ONLY
)
- include(${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake)
+ include("${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake")
if(CMAKE_CXX_SIZEOF_DATA_PTR)
foreach(f ${CMAKE_CXX_ABI_FILES})
|