diff options
author | Peter Kuemmel <syntheticpp@gmx.net> | 2012-06-09 09:36:53 (GMT) |
---|---|---|
committer | Peter Kuemmel <syntheticpp@gmx.net> | 2012-06-09 10:10:52 (GMT) |
commit | 8b27a94f2879b3ea1c00e1e0e4bef7cc77fd2cb6 (patch) | |
tree | 764e49d19cb86500e26be1e37b7ba9a073b7bdef /Modules/CMakeClDeps.cmake | |
parent | 64c5752d938457be411e3a9d781d4441e6634743 (diff) | |
download | CMake-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.cmake | 5 |
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() |