From: <sis...@op...> - 2015-03-09 10:27:03
|
-----Original Message----- From: John Tsiombikas Sent: Monday, March 09, 2015 6:37 PM To: fre...@li... Subject: Re: [Freeglut-developer] FreeGLUT 3.0.0 Released! On Mon, Mar 09, 2015 at 02:33:29PM +1100, sis...@op... wrote: >> >> I don't think you can even script that properly (on Windows, anyway). >> For a start, I think you'd still need to do the 'cd ..' and 'cd mkdir' >> manually. And then if there's anything open (say CMakeCache.txt is open >> in >> notepad) that's accessing any part of the directory that you're trying to >> remove, then the rmdir is going to fail. > > If you do it with a separate build dir as Vinnie mentioned, there's > nothing you'd want to edit in there anyway so there wouldn't be anything > open. I wasn't opening CMakeCache.txt all the time so I could *alter* it. I was opening it to find out what it was specifying - and also to find out what precise term I needed to define on the command line in order to fix the wrong setting. Sure - if things work flawlessly then there's no need to open anything. > That's the proper way to do it. Yes - but that doesn't mean it's the sensible thing to do. (I'm usually quite tolerant of kludges - but even I think this is an awful kludge.) After doing the 'cd ..', 'rmdir', 'mkdir build', 'cd build' dance 10 times (and still getting it wrong), the novelty starts to wear a bit thin. When something stuffs up, I'm much happier now that I can simply do 'perl ../rm.pl' (even if CmakeCache.txt is still open in notepad) and have all the files in "build" directory deleted - so that I can go straight back to trying another 'cmake' command. I've now done several builds/installs in the same "build" directory using different mingw compilers and configurations. All I've done between each build is run 'perl ../rm.pl'. It works nicely - I've encountered no gotchas yet (touch wood :-) I'm annoyed I didn't think to start doing that yesterday. > And then you could have multiple build directories for 32bit, 64bit, > release/debug whatever. Well - that option is still open to me. I can name the directory to what I want - and then switch to a new build directory once the build has successfully completed. In the meantime, while I'm having trouble getting a successful build, it's just a matter of 'perl ../rm.pl' and try again. Each to his own, I guess. I'm not advocating that others should take this approach - it's just the best way for *me*. Cheers, Rob |