2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2002-01-21 23:30:43 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2002-01-21 23:30:43 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2001-11-05 02:05:21 +03:00
|
|
|
#include "cmCursesForm.h"
|
|
|
|
|
2014-01-04 09:47:13 +04:00
|
|
|
cmsys::ofstream cmCursesForm::DebugFile;
|
2001-12-04 19:16:04 +03:00
|
|
|
bool cmCursesForm::Debug = false;
|
|
|
|
|
2001-11-05 02:05:21 +03:00
|
|
|
cmCursesForm::cmCursesForm()
|
|
|
|
{
|
2016-06-27 23:44:16 +03:00
|
|
|
this->Form = CM_NULLPTR;
|
2001-11-05 02:05:21 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
cmCursesForm::~cmCursesForm()
|
|
|
|
{
|
2016-05-16 17:34:04 +03:00
|
|
|
if (this->Form) {
|
2006-03-16 18:44:55 +03:00
|
|
|
unpost_form(this->Form);
|
|
|
|
free_form(this->Form);
|
2016-06-27 23:44:16 +03:00
|
|
|
this->Form = CM_NULLPTR;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2001-11-05 02:05:21 +03:00
|
|
|
}
|
2001-12-04 19:16:04 +03:00
|
|
|
|
|
|
|
void cmCursesForm::DebugStart()
|
|
|
|
{
|
|
|
|
cmCursesForm::Debug = true;
|
|
|
|
cmCursesForm::DebugFile.open("ccmakelog.txt");
|
|
|
|
}
|
|
|
|
|
|
|
|
void cmCursesForm::DebugEnd()
|
|
|
|
{
|
2016-05-16 17:34:04 +03:00
|
|
|
if (!cmCursesForm::Debug) {
|
2001-12-04 19:16:04 +03:00
|
|
|
return;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2001-12-04 19:16:04 +03:00
|
|
|
|
|
|
|
cmCursesForm::Debug = false;
|
|
|
|
cmCursesForm::DebugFile.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
void cmCursesForm::LogMessage(const char* msg)
|
|
|
|
{
|
2016-05-16 17:34:04 +03:00
|
|
|
if (!cmCursesForm::Debug) {
|
2001-12-04 19:16:04 +03:00
|
|
|
return;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2001-12-04 19:16:04 +03:00
|
|
|
|
|
|
|
cmCursesForm::DebugFile << msg << std::endl;
|
|
|
|
}
|