summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeClDeps.cmake
diff options
context:
space:
mode:
authorPeter Kuemmel <syntheticpp@gmx.net>2012-06-09 09:36:53 (GMT)
committerPeter Kuemmel <syntheticpp@gmx.net>2012-06-09 10:10:52 (GMT)
commit8b27a94f2879b3ea1c00e1e0e4bef7cc77fd2cb6 (patch)
tree764e49d19cb86500e26be1e37b7ba9a073b7bdef /Modules/CMakeClDeps.cmake
parent64c5752d938457be411e3a9d781d4441e6634743 (diff)
downloadCMake-8b27a94f2879b3ea1c00e1e0e4bef7cc77fd2cb6.zip
CMake-8b27a94f2879b3ea1c00e1e0e4bef7cc77fd2cb6.tar.gz
CMake-8b27a94f2879b3ea1c00e1e0e4bef7cc77fd2cb6.tar.bz2
Ninja: don't set cmcldeps vars to empty string when they are not defined
Diffstat (limited to 'Modules/CMakeClDeps.cmake')
-rw-r--r--Modules/CMakeClDeps.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/CMakeClDeps.cmake b/Modules/CMakeClDeps.cmake
index 1d3e986..9c49169 100644
--- a/Modules/CMakeClDeps.cmake
+++ b/Modules/CMakeClDeps.cmake
@@ -17,7 +17,7 @@
# in front of each include path, so it can remove it.
#
-IF(MSVC_C_ARCHITECTURE_ID AND CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_C_COMPILER)
+IF(MSVC_C_ARCHITECTURE_ID AND CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_C_COMPILER AND CMAKE_COMMAND)
STRING(REPLACE "cmake.exe" "cmcldeps.exe" CMAKE_CMCLDEPS_EXECUTABLE ${CMAKE_COMMAND})
SET(showdir ${CMAKE_BINARY_DIR}/CMakeFiles/ShowIncludes)
FILE(WRITE ${showdir}/foo.h "\n")
@@ -29,5 +29,6 @@ IF(MSVC_C_ARCHITECTURE_ID AND CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_C_COMPIL
STRING(TOLOWER ${header1} header2)
STRING(REPLACE ${header2} "" showOut2 ${showOut1})
STRING(REPLACE "\n" "" showOut3 ${showOut2})
- SET(CMAKE_CL_SHOWINCLUDE_PREFIX ${showOut3} CACHE STRING "cl.exe's /showInclides prefix" FORCE)
+ SET(SET_CMAKE_CMCLDEPS_EXECUTABLE "SET(CMAKE_CMCLDEPS_EXECUTABLE \"${CMAKE_CMCLDEPS_EXECUTABLE}\")")
+ SET(SET_CMAKE_CL_SHOWINCLUDE_PREFIX "SET(CMAKE_CL_SHOWINCLUDE_PREFIX \"${showOut3}\")")
ENDIF()