Unless everything is installed in the same location, copying the CMakeCache.txt likely won't work, as it includes things like paths to compilers in it, if I remember rightly. I've used diffs to try to identify which variables I've set before, but in practice, I end up just memorizing the three or four variables I tend to change from the defaults. James On Tue, 23 Feb 2021 at 22:06, Paul C. Anagnostopoulos via llvm-dev < llvm-dev at lists.llvm.org> wrote:> I've edited CMakeCache.txt so many times that I have no idea what to > specify on the 'cmake' command line. Should I just guess, run cmake, copy > my existing file on top of CMakeCache.txt, and run cmake again? > > At 2/23/2021 04:46 PM, Stefanos Baziotis wrote: > >Hi Paul, > > > >Maybe I missed something but why do you need to copy directories if you > want to build from scratch? > >Just use the same CMake arguments you used in the original build. > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://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/20210224/69719f40/attachment.html>
I wrote a short bash script to invoke cmake with all the things I always want. Don’t need to waste valuable neurons on remembering these things. --paulr From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of James Henderson via llvm-dev Sent: Wednesday, February 24, 2021 3:56 AM To: Paul C. Anagnostopoulos <paul at windfall.com> Cc: llvm-dev <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Moving to a new machine Unless everything is installed in the same location, copying the CMakeCache.txt likely won't work, as it includes things like paths to compilers in it, if I remember rightly. I've used diffs to try to identify which variables I've set before, but in practice, I end up just memorizing the three or four variables I tend to change from the defaults. James On Tue, 23 Feb 2021 at 22:06, Paul C. Anagnostopoulos via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: I've edited CMakeCache.txt so many times that I have no idea what to specify on the 'cmake' command line. Should I just guess, run cmake, copy my existing file on top of CMakeCache.txt, and run cmake again? At 2/23/2021 04:46 PM, Stefanos Baziotis wrote:>Hi Paul, > >Maybe I missed something but why do you need to copy directories if you want to build from scratch? >Just use the same CMake arguments you used in the original build._______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<https://urldefense.com/v3/__https:/lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev__;!!JmoZiZGBv3RvKRSx!uwRzfbSuLrVJDmZlNLGN5w6tMCuR0Hch3P2x0obUAHxKe8HylU7pKDL2h3ceBIqo9w$> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210224/0497fc95/attachment.html>
Paul C. Anagnostopoulos via llvm-dev
2021-Feb-24 17:15 UTC
[llvm-dev] Moving to a new machine
At 2/24/2021 03:56 AM, James Henderson wrote:>Unless everything is installed in the same location, copying the CMakeCache.txt likely won't work, as it includes things like paths to compilers in it, if I remember rightly. I've used diffs to try to identify which variables I've set before, but in practice, I end up just memorizing the three or four variables I tend to change from the defaults.Ah, another good point. Thanks, everyone, for your help with this. While I've got you, one more question. I've cloned llvm_project on my new machine. I have only one branch that is interesting on my old machine. What is the safest way to bring the files committed on that branch over to the new machine and make a branch with them?
Paul C. Anagnostopoulos via llvm-dev
2021-Feb-24 20:51 UTC
[llvm-dev] Moving to a new machine
At 2/24/2021 03:56 AM, James Henderson wrote:>Unless everything is installed in the same location, copying the CMakeCache.txt likely won't work, as it includes things like paths to compilers in it, if I remember rightly. I've used diffs to try to identify which variables I've set before, but in practice, I end up just memorizing the three or four variables I tend to change from the defaults.Of course I'm not done with questions. When I run CMake, it complains that it cannot find the C, C++, and ASM compilers. I don't recall this problem before. I have Visual Studio installed, but CMake isn't finding it. If it matters, my build directory is not on the C drive. I'm using Ninja to build.