summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-08-29 19:57:57 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-08-29 19:57:57 (GMT)
commit97dc84a613b1c25340d705537b015e410d541b14 (patch)
tree99cd128e86d8378d81e07d4dc35a2b7d7dce151c /Source/cmake.cxx
parent222199b3cdeb6266165a4b60c475fa7946b933d2 (diff)
downloadCMake-97dc84a613b1c25340d705537b015e410d541b14.zip
CMake-97dc84a613b1c25340d705537b015e410d541b14.tar.gz
CMake-97dc84a613b1c25340d705537b015e410d541b14.tar.bz2
ENH: run cmake from cmaketest
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 6b6673b..5dbf630 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -132,7 +132,10 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args)
// Find our own executable.
std::string cMakeSelf = args[0];
cmSystemTools::ConvertToUnixSlashes(cMakeSelf);
- cMakeSelf = cmSystemTools::FindProgram(cMakeSelf.c_str());
+ if(!cmSystemTools::FileExists(cMakeSelf.c_str()))
+ {
+ cMakeSelf = cmSystemTools::FindProgram(cMakeSelf.c_str());
+ }
if(!cmSystemTools::FileExists(cMakeSelf.c_str()))
{
#ifdef CMAKE_BUILD_DIR
@@ -242,7 +245,6 @@ int cmake::Generate(const std::vector<std::string>& args, bool buildMakefiles)
return -1;
}
}
-
// Create a makefile
cmMakefile mf;