diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-05-07 13:02:45 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-05-07 13:02:45 (GMT) |
commit | 3bc9830686f25304024d3bc2849d530ac057763d (patch) | |
tree | 13031f07ef9e2128ca7a3e23d535242ca3634e85 /Source/cmUnixMakefileGenerator.cxx | |
parent | e9e69b7e5e5a331662093f801ada63494ffac0be (diff) | |
download | CMake-3bc9830686f25304024d3bc2849d530ac057763d.zip CMake-3bc9830686f25304024d3bc2849d530ac057763d.tar.gz CMake-3bc9830686f25304024d3bc2849d530ac057763d.tar.bz2 |
ENH: add an edit_cache target that runs ccmake or CMakeSetup
Diffstat (limited to 'Source/cmUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 5609bda..2bbd1e9 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -1610,6 +1610,12 @@ void cmUnixMakefileGenerator::OutputMakeVariables(std::ostream& fout) fout << "CMAKE_COMMAND = " << this->ConvertToOutputPath(m_Makefile->GetDefinition("CMAKE_COMMAND")) << "\n"; + if(m_Makefile->GetDefinition("CMAKE_EDIT_COMMAND")) + { + fout << "CMAKE_EDIT_COMMAND = " + << this->ConvertToOutputPath(m_Makefile->GetDefinition("CMAKE_EDIT_COMMAND")) + << "\n"; + } fout << "CMAKE_CURRENT_SOURCE = " << this->ConvertToOutputPath(m_Makefile->GetStartDirectory()) << "\n"; @@ -1864,6 +1870,18 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout) "$(CMAKE_BINARY_DIR)/CMakeCache.txt", "$(CMAKE_COMMAND) " "-H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"); + // if CMAKE_EDIT_COMMAND is defined then add a rule to run it + // called edit_cache + if(m_Makefile->GetDefinition("CMAKE_EDIT_COMMAND")) + { + this->OutputMakeRule(fout, + "Edit the CMakeCache.txt file with ccmake or CMakeSetup", + "edit_cache", + 0, + "$(CMAKE_EDIT_COMMAND) " + "-H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"); + } + this->OutputMakeRule(fout, "Create CMakeCache.txt file", "$(CMAKE_BINARY_DIR)/CMakeCache.txt", |