summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-02-24 23:15:35 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-02-24 23:15:35 (GMT)
commit3d9610feec2219340e01b93c9cb20c75a68fdd82 (patch)
tree8b6099ea2d301439850e1e2f1cd211fb72e01388
parent1cd8c643842ea02558eebaf84f192a17d4c9361f (diff)
downloadCMake-3d9610feec2219340e01b93c9cb20c75a68fdd82.zip
CMake-3d9610feec2219340e01b93c9cb20c75a68fdd82.tar.gz
CMake-3d9610feec2219340e01b93c9cb20c75a68fdd82.tar.bz2
COMP: More fixes for non makefile generators and global targets
-rw-r--r--Source/cmGlobalGenerator.cxx13
-rw-r--r--Source/cmake.h1
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)();