diff options
author | Matthew Voss <matthew.voss@sony.com> | 2023-03-01 17:49:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-07 19:41:32 (GMT) |
commit | d3c4c6d630f25d988b1f4876d55e7e35b9bfb6da (patch) | |
tree | 8dfe8268323a9054ee56469dcc633ac7037b1228 /Modules | |
parent | 3d6075da4df6a4f93a835e446c2bbf29488f50bd (diff) | |
download | CMake-d3c4c6d630f25d988b1f4876d55e7e35b9bfb6da.zip CMake-d3c4c6d630f25d988b1f4876d55e7e35b9bfb6da.tar.gz CMake-d3c4c6d630f25d988b1f4876d55e7e35b9bfb6da.tar.bz2 |
VS: Import default C++ props file before toolset-specific props file
This avoids overwriting toolset-specific settings like `VCRedistDir`
with default settings.
Fixes: #22420
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 1f89c74..0878dff 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -401,6 +401,9 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} endif() endif() set(id_toolset_version_props "<Import Project=\"${CMAKE_GENERATOR_INSTANCE}\\VC\\Auxiliary\\Build${id_sep}${CMAKE_VS_PLATFORM_TOOLSET_VERSION}\\Microsoft.VCToolsVersion.${CMAKE_VS_PLATFORM_TOOLSET_VERSION}.props\" />") + if(lang STREQUAL CXX OR lang STREQUAL C) + set(id_toolset_version_props "<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />${id_toolset_version_props}") + endif() unset(id_sep) endif() endif() |