FRUT
FRUT copied to clipboard
Visual Studio 2019 - ClangCl Toolset - LTCG flag
Hi @McMartin ,
In our project, we have been experimenting with clangCl
as a toolset of Visual Studio 2019 to compile our project with clang on Windows.
Everything seems to work well, except for the flag /LTCG
which triggers an error since it doesn't exist for clang
. 😢
Since, we have only been experimenting with clangCl
, disabling the flag manually in Visual Studio was good for us.
Regardless, I want to report this to you, because it may come from the cmake code below:
https://github.com/McMartin/FRUT/blob/37dc1a713d5ebe0e03219483f81e4aa128b410c0/cmake/Reprojucer.cmake#L5565-L5569
https://github.com/McMartin/FRUT/blob/37dc1a713d5ebe0e03219483f81e4aa128b410c0/cmake/Reprojucer.cmake#L5587-L5592
https://github.com/McMartin/FRUT/blob/37dc1a713d5ebe0e03219483f81e4aa128b410c0/cmake/Reprojucer.cmake#L5601-L5606
To be sure, before submitting this issue, I have set the variable ltcg_link_flag
to an empty string, and remove the others /LTCG
, and then everything compiled fine with the toolset clangCl
🙂
I hope this help you enhance FRUT support on Visual Studio 2019 🙂
Have a great day 😄
Hi @Xav83,
I'm currently installing the Clang for Windows component of Visual Studio 2019. I'll give this a try and report back!
@Xav83 I can't reproduce the error 😅
Which version of CMake are you using and what arguments are you passing to it exactly?
Could you please also share the output of calling cmake
in a new binary directory, when it detects the C/CXX compiler and its features?
Thanks!