ENH: tell cmake object where cmake is

This commit is contained in:
Bill Hoffman 2001-11-06 12:03:36 -05:00
parent 319a5e0077
commit 4ddee8e0e8
3 changed files with 8 additions and 5 deletions

View File

@ -59,11 +59,11 @@ int main(int argc, char** argv)
if ( argc == 2 )
{
myform = new cmCursesMainForm(argv[1], newCache);
myform = new cmCursesMainForm(argv[1], argv[0], newCache);
}
else
{
myform = new cmCursesMainForm("", newCache);
myform = new cmCursesMainForm("", argv[0], newCache);
}
myform->InitializeUI(w);
myform->Render(1, 1, x, y);

View File

@ -21,8 +21,9 @@ inline int ctrl(int z)
}
cmCursesMainForm::cmCursesMainForm(const char* whereSource,
const char* whereCMake,
bool newCache) :
m_WhereSource(whereSource)
m_WhereSource(whereSource), m_WhereCMake(whereCMake)
{
m_Fields = 0;
m_Window = 0;
@ -331,7 +332,7 @@ void cmCursesMainForm::RunCMake(bool generateMakefiles)
cmake make;
// create the arguments for the cmake object
std::vector<std::string> args;
args.push_back("cmake");
args.push_back(m_WhereCMake);
if (m_WhereSource != "")
{
std::string arg;

View File

@ -10,7 +10,8 @@ class cmCursesCacheEntryComposite;
class cmCursesMainForm : public cmCursesForm
{
public:
cmCursesMainForm(const char* whereSource, bool newCache);
cmCursesMainForm(const char* whereSource, const char* whereCMake,
bool newCache);
virtual ~cmCursesMainForm();
// Description:
@ -62,6 +63,7 @@ protected:
FIELD** m_Fields;
WINDOW* m_Window;
std::string m_WhereSource;
std::string m_WhereCMake;
int m_Height;
};