[LLVMdev] Hi, everyone, fail on building c-index-test
罗勇刚(Yonggang Luo)
luoyonggang at gmail.com
Wed Oct 7 07:57:41 PDT 2009
>
> I've committed my suggested fix. There's no point in setting the
> LINKER_LANGUAGE property of every LLVM library, because CMake figures out
> the right language based on the file extensions of the source files.
Yes, CMake figures out the *right language* based on the file extensions of
the source files.
But, llvm is based on *C++*
for example, if you create a application just containing *C *extension
files,
but using llvm as the midware, then CMake system *must *auto recognize
the LINKER_LANGUAGE as CXX, but not C. Even all source files in this project
is C extension.
Now, it's using a strange hack, just
set_target_properties(c-index-test
PROPERTIES
LINKER_LANGUAGE CXX)
It's not reasonable, because it's not because of c-index-test.c lead the
LINKER_LANGUAGE to be CXX
but llvm make this happened, so it's shouldn't be placed at
c-index-test.c/CMakeLists.txt
*and should be placed at *
AddLLVM.cmake
That's means, every *new project(OR executable)* using LLVM as the
dependent,
then then
LINKER_LANGUAGE must be set to CXX in an auto way,
but not set it manually.
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091007/0f52982b/attachment.html>
More information about the llvm-dev
mailing list