summaryrefslogtreecommitdiffstats
path: root/Source/CMakeBuildTargets.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-05-17 21:43:29 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-05-17 21:43:29 (GMT)
commita8ccbf7c21cf9125217f53969e89aa082fcf8b19 (patch)
treef84526de9b71cb5ef41ce4518f31c0eda4aec375 /Source/CMakeBuildTargets.cxx
parentf9a36a6ff9b00a6dcecc66e681f4a9ec48eb8c5c (diff)
downloadCMake-a8ccbf7c21cf9125217f53969e89aa082fcf8b19.zip
CMake-a8ccbf7c21cf9125217f53969e89aa082fcf8b19.tar.gz
CMake-a8ccbf7c21cf9125217f53969e89aa082fcf8b19.tar.bz2
compile source dir into cmake
Diffstat (limited to 'Source/CMakeBuildTargets.cxx')
-rw-r--r--Source/CMakeBuildTargets.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/Source/CMakeBuildTargets.cxx b/Source/CMakeBuildTargets.cxx
index 057f149..e65be07 100644
--- a/Source/CMakeBuildTargets.cxx
+++ b/Source/CMakeBuildTargets.cxx
@@ -65,18 +65,8 @@ int main(int ac, char** av)
Usage(av[0]);
return -1;
}
-
// set the cmake root directory
- std::string root = cmSystemTools::GetProgramPath(av[0]);
- std::string::size_type slashPos = root.rfind("/");
- if(slashPos != std::string::npos)
- {
- root = root.substr(0, slashPos);
- }
- cmCacheManager::GetInstance()->AddCacheEntry
- ("CMAKE_ROOT", root.c_str(),
- "Path to CMake installation.", cmCacheManager::INTERNAL);
-
+ std::string root = CMAKE_ROOT_DIR;
// Create a makefile
cmMakefile mf;
@@ -138,6 +128,9 @@ int main(int ac, char** av)
// Read and parse the input makefile
mf.MakeStartDirectoriesCurrent();
cmCacheManager::GetInstance()->LoadCache(&mf);
+ cmCacheManager::GetInstance()->AddCacheEntry
+ ("CMAKE_ROOT", root.c_str(),
+ "Path to CMake installation.", cmCacheManager::INTERNAL);
// Find our own exectuable.
std::string cMakeSelf = cmSystemTools::FindProgram(av[0]);