[Cmake-commits] [cmake-commits] hoffman committed cmSystemTools.cxx 1.387 1.388
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Jan 20 10:06:41 EST 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv2665
Modified Files:
cmSystemTools.cxx
Log Message:
BUG: fix crash with cmd.exe shell and cmake in the path
Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.387
retrieving revision 1.388
diff -C 2 -d -r1.387 -r1.388
*** cmSystemTools.cxx 26 Nov 2008 20:41:16 -0000 1.387
--- cmSystemTools.cxx 20 Jan 2009 15:06:39 -0000 1.388
***************
*** 2243,2246 ****
--- 2243,2254 ----
void cmSystemTools::FindExecutableDirectory(const char* argv0)
{
+ #if defined(_WIN32) && !defined(__CYGWIN__)
+ (void)argv0; // ignore this on windows
+ char modulepath[_MAX_PATH];
+ ::GetModuleFileName(NULL, modulepath, sizeof(modulepath));
+ cmSystemToolsExecutableDirectory =
+ cmSystemTools::GetFilenamePath(modulepath);
+ return;
+ #else
std::string errorMsg;
std::string exe;
***************
*** 2256,2259 ****
--- 2264,2268 ----
// ???
}
+ #endif
}
More information about the Cmake-commits
mailing list