Stanislav Pankevich via llvm-dev
2017-Feb-18 21:37 UTC
[llvm-dev] LLVM/CMake: in-source-tree and out-of-source tree CMake configs for the same project.
Hello, Does anyone have a positive experience of maintaining CMake configs for both in-source and out-of-source kinds of hosting in the same project? P.S. http://stanislaw.github.io/2017/02/18/llvm-in-source-vs-out-of-source.html. Thanks, Stanislav -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170218/ca296a83/attachment.html>
Chris Bieneman via llvm-dev
2017-Feb-21 00:19 UTC
[llvm-dev] LLVM/CMake: in-source-tree and out-of-source tree CMake configs for the same project.
The problem with this article is that it makes it seem like you really should choose one or the other, and that is just not so. At this point I believe all of the LLVM sub-projects support both in-tree and out-of-tree builds with LLVM. Using the LLVM CMake packages that are installed as part of most LLVM distributions you can write your CMake scripts as if they are for in-source builds, and supporting out-of-source is a minimal effort. To see how that works in practice please take a look at Clang's root CMakeLists.txt. Near the top there is a comment about standalone build support, and the required code is underneath. You'll find similarly CMake code in all the LLVM sub-projects which we use to support building each project separately. -Chris> On Feb 18, 2017, at 1:37 PM, Stanislav Pankevich via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello, > > Does anyone have a positive experience of maintaining CMake configs for both in-source and out-of-source kinds of hosting in the same project? > > P.S. http://stanislaw.github.io/2017/02/18/llvm-in-source-vs-out-of-source.html <http://stanislaw.github.io/2017/02/18/llvm-in-source-vs-out-of-source.html>. > > Thanks, > > Stanislav > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170220/2bf2b051/attachment.html>