diff options
author | Brad King <brad.king@kitware.com> | 2012-08-30 15:54:25 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-08-30 15:54:25 (GMT) |
commit | bbcd177f30d8deff35e628f6e8e9740a4c9cf5b1 (patch) | |
tree | 5113576484602b4f7ecc75eb9720a632a718a622 /Modules | |
parent | b69cf909b6eff7360942e0fbc3973cf2eaaf6a95 (diff) | |
parent | 0af27f1f2a18c9e2335d22444777f1a6559000b5 (diff) | |
download | CMake-bbcd177f30d8deff35e628f6e8e9740a4c9cf5b1.zip CMake-bbcd177f30d8deff35e628f6e8e9740a4c9cf5b1.tar.gz CMake-bbcd177f30d8deff35e628f6e8e9740a4c9cf5b1.tar.bz2 |
Merge topic 'cmcldeps-icl'
0af27f1 Ninja: also detect /showInclude prefix for icl
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeClDeps.cmake | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Modules/CMakeClDeps.cmake b/Modules/CMakeClDeps.cmake index b52641c..0214ead 100644 --- a/Modules/CMakeClDeps.cmake +++ b/Modules/CMakeClDeps.cmake @@ -26,12 +26,9 @@ if(MSVC_C_ARCHITECTURE_ID AND CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_C_COMPIL file(WRITE ${showdir}/foo.h "\n") file(WRITE ${showdir}/main.c "#include \"foo.h\" \nint main(){}\n") execute_process(COMMAND ${CMAKE_C_COMPILER} /nologo /showIncludes ${showdir}/main.c - WORKING_DIRECTORY ${showdir} OUTPUT_VARIABLE showOut) - string(REPLACE main.c "" showOut1 ${showOut}) - string(REPLACE "/" "\\" header1 ${showdir}/foo.h) - string(TOLOWER ${header1} header2) - string(REPLACE ${header2} "" showOut2 ${showOut1}) - string(REPLACE "\n" "" showOut3 ${showOut2}) + WORKING_DIRECTORY ${showdir} OUTPUT_VARIABLE outLine) + string(REGEX MATCH "\n([^:]*:[^:]*:[ \t]*)" tmp "${outLine}") + set(localizedPrefix "${CMAKE_MATCH_1}") set(SET_CMAKE_CMCLDEPS_EXECUTABLE "set(CMAKE_CMCLDEPS_EXECUTABLE \"${CMAKE_CMCLDEPS_EXECUTABLE}\")") - set(SET_CMAKE_CL_SHOWINCLUDE_PREFIX "set(CMAKE_CL_SHOWINCLUDE_PREFIX \"${showOut3}\")") + set(SET_CMAKE_CL_SHOWINCLUDE_PREFIX "set(CMAKE_CL_SHOWINCLUDE_PREFIX \"${localizedPrefix}\")") endif() |