Open mchagneux opened 1 month ago
These cmake files are part of the libtorch library. They look like they are automatically generated by the libtorch cmake install command. So it's something we cann't change since we download the libs from their servers on build.
We will think about your suggestion with the compile flags and report back :)
Hi !
I'm trying to work on Windows with a cross-platform toolchain so I'm using Ninja + Clang for my project. Since Clang for MSCV is ABI compatible with MSVC code, everything works fine with the anira binaries except for Clang errors related to the symbols
\bigobj
and\EHsc
. Those flags are set in\lib\cmake\Caffe2\Caffe2Targets.cmake
in the pre-built binaries (0.1.2), so it's possible to make it work by changing:into
I don't know if this
.cmake
file is written as part of your code or if it comes with the libtorch library. In the latter case maybe there's a CMake command that could be used to intercept the MSVC flags and change them before compilation (this way there's no need to change the libtorch code), but I don't know it. If it's part of your code I suggest making the change so that this toolchain is readily enable on Windows.Best,
Mathis.