From 3d9610feec2219340e01b93c9cb20c75a68fdd82 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Fri, 24 Feb 2006 18:15:35 -0500 Subject: COMP: More fixes for non makefile generators and global targets --- Source/cmGlobalGenerator.cxx | 13 +++++++------ Source/cmake.h | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index d85250f..fe8324e 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1248,11 +1248,13 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end()); singleLine.erase(singleLine.begin(), singleLine.end()); depends.erase(depends.begin(), depends.end()); + + const char* cmakeCommand = this->GetCMakeInstance()->GetCMakeCommand(); // Use CMAKE_EDIT_COMMAND for the edit_cache rule if it is defined. // Otherwise default to the interactive command-line interface. if(mf->GetDefinition("CMAKE_EDIT_COMMAND")) { - singleLine.push_back("$(CMAKE_EDIT_COMMAND)"); + singleLine.push_back(mf->GetDefinition("CMAKE_EDIT_COMMAND")); singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); cpackCommandLines.push_back(singleLine); @@ -1263,7 +1265,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) } else { - singleLine.push_back("$(CMAKE_COMMAND)"); + singleLine.push_back(cmakeCommand); singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); singleLine.push_back("-i"); @@ -1278,7 +1280,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) cpackCommandLines.erase(cpackCommandLines.begin(), cpackCommandLines.end()); singleLine.erase(singleLine.begin(), singleLine.end()); depends.erase(depends.begin(), depends.end()); - singleLine.push_back("$(CMAKE_COMMAND)"); + singleLine.push_back(cmakeCommand); singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); cpackCommandLines.push_back(singleLine); @@ -1301,12 +1303,11 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) // We are building CMake itself. We cannot use the original // executable to install over itself. cmd = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH"); - cmd += "/"; - cmd += "cmake"; + cmd += "/cmake"; } else { - cmd = "$(CMAKE_COMMAND)"; + cmd = cmakeCommand; } singleLine.push_back(cmd.c_str()); const char* cmakeCfgIntDir = this->GetCMakeCFGInitDirectory(); diff --git a/Source/cmake.h b/Source/cmake.h index a8c8c57..e74b885 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -273,6 +273,7 @@ class cmake */ const char* GetCTestCommand(); const char* GetCPackCommand(); + const char* GetCMakeCommand() { return m_CMakeCommand.c_str(); } protected: typedef cmGlobalGenerator* (*CreateGeneratorFunctionType)(); -- cgit v0.12