---------- Forwarded message ---------- From: Eric Noulard <eric.noul...@gmail.com> Date: 2009/11/14 Subject: Re: [CMake] Finding the "Temp" directory code To: Michael Wild <them...@gmail.com>
2009/11/14 Michael Wild <them...@gmail.com>: > > On 14. Nov, 2009, at 24:55 , Michael Jackson wrote: > >> Does anyone have any CMake code to find the designated temp folder >> location for each platform? Was thinking this might be in CMake somewhere >> but I did not seem to find anything. >> >> Thanks >> > > I think on WIN32 its TEMP and TMP and on all UNIX I kno of its TMPDIR. On my Linux box there is neither TEMP/TMP/TMPDIR env var defined. Usually "/tmp" is a good bet. Moreover if you machine is used by multiple user **at the same time** which tends to be the case for some Unix machine. You should usually find a TEMP location which is user specific because if not you may end up with multiple user access the same "TEMP". On unix you have tmpnam(3), tmpfile(3) which should gives you appropriate system-unique temporary name/file. It doesn't really help for the initial question but I wanted to notice that once you found TMP folder you may have to build appropriate uniquely named subfolder in order to avoid possible multi-user name clash. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake