[cmake] Restrict resource file usage to Windows build hosts
authorShoaib Meenai <smeenai@fb.com>
Wed, 25 Oct 2017 17:11:28 +0000 (17:11 +0000)
committerShoaib Meenai <smeenai@fb.com>
Wed, 25 Oct 2017 17:11:28 +0000 (17:11 +0000)
commit6391458e9c52e3cf287fcd44a57c5752b47f1613
tree0d5556c8fa3312c1e913cac5a39c452e2da2c373
parent009cebfed8bc893d8a48c5f9f0227a0a83967600
[cmake] Restrict resource file usage to Windows build hosts

Resource file compilation requires a working resource compiler.
Unfortunately, llvm-rc isn't quite there yet [1], and cmake's rc
invocation only works on Windows [2]. Until both those issues are
addressed, disable resource file usage on non-Windows build hosts, to
unblock Windows cross-compilation. This is also consistent with the
existing comment, which says "If *on Windows* and building with MSVC".

[1] http://lists.llvm.org/pipermail/llvm-dev/2017-October/118433.html
[2] https://public.kitware.com/pipermail/cmake/2017-October/066441.html

Differential Revision: https://reviews.llvm.org/D39265

llvm-svn: 316594
llvm/cmake/modules/AddLLVM.cmake