diff options
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() |