summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompiler.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-18 13:09:07 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-18 14:02:53 (GMT)
commit109a7a245acf0c367ac092f6c9a20661e7a31529 (patch)
treeb4e786f43b4bec7a75f4854e10cd0745e82c765d /Modules/CMakeCXXCompiler.cmake.in
parent828c05b9f567e0652ebbee6df2799a189ff586fe (diff)
downloadCMake-109a7a245acf0c367ac092f6c9a20661e7a31529.zip
CMake-109a7a245acf0c367ac092f6c9a20661e7a31529.tar.gz
CMake-109a7a245acf0c367ac092f6c9a20661e7a31529.tar.bz2
Ninja: Detect MSVC /showIncludes prefix with compiler flags (#15596)
Move detection over to the compiler id logic where we have already constructed the list of compiler flags from ARG1 and CMAKE_<LANG>_FLAGS. Pass the flags when we execute "cl" with "/showIncludes". Also pass "/c" because we only need to compile, not link. Check the compiler process exit code before trusting its output.
Diffstat (limited to 'Modules/CMakeCXXCompiler.cmake.in')
-rw-r--r--Modules/CMakeCXXCompiler.cmake.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index e4e1257..52e44f6 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -54,11 +54,14 @@ if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_CXX_LIBRARY_ARCHITECTURE@")
endif()
+set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "@CMAKE_CXX_CL_SHOWINCLUDES_PREFIX@")
+if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
+ set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
+endif()
+
@CMAKE_CXX_SYSROOT_FLAG_CODE@
@CMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG_CODE@
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@")
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES@")
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
-
-@SET_CMAKE_CL_SHOWINCLUDES_PREFIX@