mirror of
https://github.com/reactos/CMake.git
synced 2024-12-02 16:46:36 +00:00
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.
This commit is contained in:
parent
62b308515a
commit
a650dbb280
@ -235,6 +235,8 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
|
|||||||
endif()
|
endif()
|
||||||
set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR})
|
set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR})
|
||||||
set(id_src "${src}")
|
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
|
configure_file(${CMAKE_ROOT}/Modules/CompilerId/VS-${v}.${ext}.in
|
||||||
${id_dir}/CompilerId${lang}.${ext} @ONLY)
|
${id_dir}/CompilerId${lang}.${ext} @ONLY)
|
||||||
if(CMAKE_VS_MSBUILD_COMMAND AND NOT lang STREQUAL "Fortran")
|
if(CMAKE_VS_MSBUILD_COMMAND AND NOT lang STREQUAL "Fortran")
|
||||||
|
@ -49,11 +49,11 @@
|
|||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Command>for %%i in (@id_cl@) do %40echo CMAKE_@id_lang@_COMPILER=%%~$PATH:i</Command>
|
<Command>@id_PostBuildEvent_Command@</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="@id_src@" />
|
<@id_compile@ Include="@id_src@" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user