[cmake-developers] [PATCH] Let CMake know that clang uses the GCC toolchain.
Brad King
brad.king at kitware.com
Tue Aug 2 13:08:47 EDT 2016
On 07/29/2016 05:44 PM, Chaoren Lin via cmake-developers wrote:
> Clang on Windows uses the GCC toolchain, so we need to avoid using
> backslashes for paths in response files.
[snip]
> strcmp(mf->GetSafeDefinition("CMAKE_C_COMPILER_ID"), "GNU") == 0 ||
> strcmp(mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID"), "GNU") == 0 ||
> strcmp(mf->GetSafeDefinition("CMAKE_C_SIMULATE_ID"), "GNU") == 0 ||
> - strcmp(mf->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID"), "GNU") == 0) {
Clang on Windows also comes in a cl-like variant whose response files may
need backslashes. In the gcc-like variant the CMAKE_{C,CXX}_SIMULATE_ID
should be detected as GNU and cause the existing code to work. What goes
wrong in your use case?
Thanks,
-Brad
More information about the cmake-developers
mailing list