How to detect target architecture using CMake?

后端 未结 8 1452
感情败类
感情败类 2020-12-08 02:17

I\'ve done a lot of research and been unable to find an answer to this... how can I reliably find the target architecture I\'m compiling for, using CMake? Basically, the equ

8条回答
  •  孤街浪徒
    2020-12-08 02:41

    I think the easiest and most reliable solution is to specify the architecture somehow by hand, for the platform you're building on (you can use cmake . -DMY_ARCHITECTURE=x86 or something similar). At least that's what we're doing in our projects, because of the same issues you described above

提交回复
热议问题