summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-01-16 20:21:23 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-10 15:19:54 (GMT)
commita650dbb280859bdbadb9a7bba5636955190ec18a (patch)
treef5fcd248462a06a1c54339be44c5ecf0dc285e0f /Modules/CMakeDetermineCompilerId.cmake
parent62b308515abe01fbe03ce0e1c7fee4879ca665b1 (diff)
downloadCMake-a650dbb280859bdbadb9a7bba5636955190ec18a.zip
CMake-a650dbb280859bdbadb9a7bba5636955190ec18a.tar.gz
CMake-a650dbb280859bdbadb9a7bba5636955190ec18a.tar.bz2
VS: Refactor compiler id detection project file template
Make the `ClCompile` element name and `PostBuildEvent/Command` value configurable. Move the current content into default values for the corresponding variables.
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index ae485bf..7dcd981 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -235,6 +235,8 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
endif()
set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR})
set(id_src "${src}")
+ set(id_compile "ClCompile")
+ set(id_PostBuildEvent_Command "for %%i in (${id_cl}) do %40echo CMAKE_${lang}_COMPILER=%%~$PATH:i")
configure_file(${CMAKE_ROOT}/Modules/CompilerId/VS-${v}.${ext}.in
${id_dir}/CompilerId${lang}.${ext} @ONLY)
if(CMAKE_VS_MSBUILD_COMMAND AND NOT lang STREQUAL "Fortran")