Remove trailing white-spaces.
This commit is contained in:
parent
a390d6cc89
commit
d3d7e45df2
|
@ -46,10 +46,10 @@ protected:
|
||||||
|
|
||||||
virtual bool SupportsComponentInstallation() const;
|
virtual bool SupportsComponentInstallation() const;
|
||||||
|
|
||||||
/// Produce a string that contains the NSIS code to describe a
|
/// Produce a string that contains the NSIS code to describe a
|
||||||
/// particular component. Any added macros will be emitted via
|
/// particular component. Any added macros will be emitted via
|
||||||
/// macrosOut.
|
/// macrosOut.
|
||||||
std::string
|
std::string
|
||||||
CreateComponentDescription(cmCPackComponent *component,
|
CreateComponentDescription(cmCPackComponent *component,
|
||||||
cmOStringStream& macrosOut);
|
cmOStringStream& macrosOut);
|
||||||
|
|
||||||
|
@ -65,14 +65,14 @@ protected:
|
||||||
(cmCPackComponent *component,
|
(cmCPackComponent *component,
|
||||||
std::set<cmCPackComponent *>& visited);
|
std::set<cmCPackComponent *>& visited);
|
||||||
|
|
||||||
/// Produce a string that contains the NSIS code to describe a
|
/// Produce a string that contains the NSIS code to describe a
|
||||||
/// particular component group, including its components. Any
|
/// particular component group, including its components. Any
|
||||||
/// added macros will be emitted via macrosOut.
|
/// added macros will be emitted via macrosOut.
|
||||||
std::string
|
std::string
|
||||||
CreateComponentGroupDescription(cmCPackComponentGroup *group,
|
CreateComponentGroupDescription(cmCPackComponentGroup *group,
|
||||||
cmOStringStream& macrosOut);
|
cmOStringStream& macrosOut);
|
||||||
|
|
||||||
/// Translations any newlines found in the string into \r\n, so that the
|
/// Translations any newlines found in the string into \r\n, so that the
|
||||||
/// resulting string can be used within NSIS.
|
/// resulting string can be used within NSIS.
|
||||||
static std::string TranslateNewlines(std::string str);
|
static std::string TranslateNewlines(std::string str);
|
||||||
};
|
};
|
||||||
|
|
|
@ -244,7 +244,7 @@ int main (int argc, char *argv[])
|
||||||
// find out which system cpack is running on, so it can setup the search
|
// find out which system cpack is running on, so it can setup the search
|
||||||
// paths, so FIND_XXX() commands can be used in scripts
|
// paths, so FIND_XXX() commands can be used in scripts
|
||||||
cminst.AddCMakePaths();
|
cminst.AddCMakePaths();
|
||||||
std::string systemFile =
|
std::string systemFile =
|
||||||
globalMF->GetModulesFile("CMakeDetermineSystem.cmake");
|
globalMF->GetModulesFile("CMakeDetermineSystem.cmake");
|
||||||
if (!globalMF->ReadListFile(0, systemFile.c_str()))
|
if (!globalMF->ReadListFile(0, systemFile.c_str()))
|
||||||
{
|
{
|
||||||
|
@ -253,7 +253,7 @@ int main (int argc, char *argv[])
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
systemFile =
|
systemFile =
|
||||||
globalMF->GetModulesFile("CMakeSystemSpecificInformation.cmake");
|
globalMF->GetModulesFile("CMakeSystemSpecificInformation.cmake");
|
||||||
if (!globalMF->ReadListFile(0, systemFile.c_str()))
|
if (!globalMF->ReadListFile(0, systemFile.c_str()))
|
||||||
{
|
{
|
||||||
|
@ -264,7 +264,7 @@ int main (int argc, char *argv[])
|
||||||
|
|
||||||
if ( cmSystemTools::FileExists(cpackConfigFile.c_str()) )
|
if ( cmSystemTools::FileExists(cpackConfigFile.c_str()) )
|
||||||
{
|
{
|
||||||
cpackConfigFile =
|
cpackConfigFile =
|
||||||
cmSystemTools::CollapseFullPath(cpackConfigFile.c_str());
|
cmSystemTools::CollapseFullPath(cpackConfigFile.c_str());
|
||||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
||||||
"Read CPack configuration file: " << cpackConfigFile.c_str()
|
"Read CPack configuration file: " << cpackConfigFile.c_str()
|
||||||
|
@ -410,7 +410,7 @@ int main (int argc, char *argv[])
|
||||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, "For project: "
|
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, "For project: "
|
||||||
<< projName << std::endl);
|
<< projName << std::endl);
|
||||||
|
|
||||||
const char* projVersion =
|
const char* projVersion =
|
||||||
mf->GetDefinition("CPACK_PACKAGE_VERSION");
|
mf->GetDefinition("CPACK_PACKAGE_VERSION");
|
||||||
if ( !projVersion )
|
if ( !projVersion )
|
||||||
{
|
{
|
||||||
|
@ -423,7 +423,7 @@ int main (int argc, char *argv[])
|
||||||
cmOStringStream ostr;
|
cmOStringStream ostr;
|
||||||
ostr << projVersionMajor << "." << projVersionMinor << "."
|
ostr << projVersionMajor << "." << projVersionMinor << "."
|
||||||
<< projVersionPatch;
|
<< projVersionPatch;
|
||||||
mf->AddDefinition("CPACK_PACKAGE_VERSION",
|
mf->AddDefinition("CPACK_PACKAGE_VERSION",
|
||||||
ostr.str().c_str());
|
ostr.str().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* \brief Helper class for CTest
|
* \brief Helper class for CTest
|
||||||
*
|
*
|
||||||
* Submit testing results
|
* Submit testing results
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class cmCTestSubmitHandler : public cmCTestGenericHandler
|
class cmCTestSubmitHandler : public cmCTestGenericHandler
|
||||||
{
|
{
|
||||||
|
@ -47,32 +47,32 @@ private:
|
||||||
/**
|
/**
|
||||||
* Submit file using various ways
|
* Submit file using various ways
|
||||||
*/
|
*/
|
||||||
bool SubmitUsingFTP(const cmStdString& localprefix,
|
bool SubmitUsingFTP(const cmStdString& localprefix,
|
||||||
const std::set<cmStdString>& files,
|
const std::set<cmStdString>& files,
|
||||||
const cmStdString& remoteprefix,
|
const cmStdString& remoteprefix,
|
||||||
const cmStdString& url);
|
const cmStdString& url);
|
||||||
bool SubmitUsingHTTP(const cmStdString& localprefix,
|
bool SubmitUsingHTTP(const cmStdString& localprefix,
|
||||||
const std::set<cmStdString>& files,
|
const std::set<cmStdString>& files,
|
||||||
const cmStdString& remoteprefix,
|
const cmStdString& remoteprefix,
|
||||||
const cmStdString& url);
|
const cmStdString& url);
|
||||||
bool SubmitUsingSCP(const cmStdString& scp_command,
|
bool SubmitUsingSCP(const cmStdString& scp_command,
|
||||||
const cmStdString& localprefix,
|
const cmStdString& localprefix,
|
||||||
const std::set<cmStdString>& files,
|
const std::set<cmStdString>& files,
|
||||||
const cmStdString& remoteprefix,
|
const cmStdString& remoteprefix,
|
||||||
const cmStdString& url);
|
const cmStdString& url);
|
||||||
|
|
||||||
bool SubmitUsingCP( const cmStdString& localprefix,
|
bool SubmitUsingCP( const cmStdString& localprefix,
|
||||||
const std::set<cmStdString>& files,
|
const std::set<cmStdString>& files,
|
||||||
const cmStdString& remoteprefix,
|
const cmStdString& remoteprefix,
|
||||||
const cmStdString& url);
|
const cmStdString& url);
|
||||||
|
|
||||||
bool TriggerUsingHTTP(const std::set<cmStdString>& files,
|
bool TriggerUsingHTTP(const std::set<cmStdString>& files,
|
||||||
const cmStdString& remoteprefix,
|
const cmStdString& remoteprefix,
|
||||||
const cmStdString& url);
|
const cmStdString& url);
|
||||||
|
|
||||||
bool SubmitUsingXMLRPC(const cmStdString& localprefix,
|
bool SubmitUsingXMLRPC(const cmStdString& localprefix,
|
||||||
const std::set<cmStdString>& files,
|
const std::set<cmStdString>& files,
|
||||||
const cmStdString& remoteprefix,
|
const cmStdString& remoteprefix,
|
||||||
const cmStdString& url);
|
const cmStdString& url);
|
||||||
|
|
||||||
void ParseResponse(std::vector<char>);
|
void ParseResponse(std::vector<char>);
|
||||||
|
|
|
@ -76,11 +76,11 @@ void onsig(int)
|
||||||
if (cmCursesForm::CurrentForm)
|
if (cmCursesForm::CurrentForm)
|
||||||
{
|
{
|
||||||
endwin();
|
endwin();
|
||||||
initscr(); /* Initialization */
|
initscr(); /* Initialization */
|
||||||
noecho(); /* Echo off */
|
noecho(); /* Echo off */
|
||||||
cbreak(); /* nl- or cr not needed */
|
cbreak(); /* nl- or cr not needed */
|
||||||
keypad(stdscr,TRUE); /* Use key symbols as
|
keypad(stdscr,TRUE); /* Use key symbols as
|
||||||
KEY_DOWN*/
|
KEY_DOWN*/
|
||||||
refresh();
|
refresh();
|
||||||
int x,y;
|
int x,y;
|
||||||
getmaxyx(stdscr, y, x);
|
getmaxyx(stdscr, y, x);
|
||||||
|
@ -89,7 +89,7 @@ void onsig(int)
|
||||||
}
|
}
|
||||||
signal(SIGWINCH, onsig);
|
signal(SIGWINCH, onsig);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeErrorHandler(const char* message, const char* title, bool&, void* clientData)
|
void CMakeErrorHandler(const char* message, const char* title, bool&, void* clientData)
|
||||||
|
@ -121,8 +121,8 @@ int main(int argc, char** argv)
|
||||||
doc.SetSection("Compatibility Commands",compatCommands);
|
doc.SetSection("Compatibility Commands",compatCommands);
|
||||||
doc.SetSeeAlsoList(cmDocumentationSeeAlso);
|
doc.SetSeeAlsoList(cmDocumentationSeeAlso);
|
||||||
return doc.PrintRequestedDocumentation(std::cout)? 0:1;
|
return doc.PrintRequestedDocumentation(std::cout)? 0:1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool debug = false;
|
bool debug = false;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int j;
|
int j;
|
||||||
|
@ -156,22 +156,22 @@ int main(int argc, char** argv)
|
||||||
cmCursesForm::DebugStart();
|
cmCursesForm::DebugStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
initscr(); /* Initialization */
|
initscr(); /* Initialization */
|
||||||
noecho(); /* Echo off */
|
noecho(); /* Echo off */
|
||||||
cbreak(); /* nl- or cr not needed */
|
cbreak(); /* nl- or cr not needed */
|
||||||
keypad(stdscr,TRUE); /* Use key symbols as
|
keypad(stdscr,TRUE); /* Use key symbols as
|
||||||
KEY_DOWN*/
|
KEY_DOWN*/
|
||||||
|
|
||||||
signal(SIGWINCH, onsig);
|
signal(SIGWINCH, onsig);
|
||||||
|
|
||||||
int x,y;
|
int x,y;
|
||||||
getmaxyx(stdscr, y, x);
|
getmaxyx(stdscr, y, x);
|
||||||
if ( x < cmCursesMainForm::MIN_WIDTH ||
|
if ( x < cmCursesMainForm::MIN_WIDTH ||
|
||||||
y < cmCursesMainForm::MIN_HEIGHT )
|
y < cmCursesMainForm::MIN_HEIGHT )
|
||||||
{
|
{
|
||||||
endwin();
|
endwin();
|
||||||
std::cerr << "Window is too small. A size of at least "
|
std::cerr << "Window is too small. A size of at least "
|
||||||
<< cmCursesMainForm::MIN_WIDTH << " x "
|
<< cmCursesMainForm::MIN_WIDTH << " x "
|
||||||
<< cmCursesMainForm::MIN_HEIGHT
|
<< cmCursesMainForm::MIN_HEIGHT
|
||||||
<< " is required to run ccmake." << std::endl;
|
<< " is required to run ccmake." << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -201,7 +201,7 @@ int main(int argc, char** argv)
|
||||||
myform->Render(1, 1, x, y);
|
myform->Render(1, 1, x, y);
|
||||||
myform->HandleInput();
|
myform->HandleInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Need to clean-up better
|
// Need to clean-up better
|
||||||
curses_clear();
|
curses_clear();
|
||||||
touchwin(stdscr);
|
touchwin(stdscr);
|
||||||
|
@ -210,7 +210,7 @@ int main(int argc, char** argv)
|
||||||
cmCursesForm::CurrentForm = 0;
|
cmCursesForm::CurrentForm = 0;
|
||||||
|
|
||||||
std::cout << std::endl << std::endl;
|
std::cout << std::endl << std::endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
inline int ctrl(int z)
|
inline int ctrl(int z)
|
||||||
{
|
{
|
||||||
return (z&037);
|
return (z&037);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCursesMainForm::cmCursesMainForm(std::vector<std::string> const& args,
|
cmCursesMainForm::cmCursesMainForm(std::vector<std::string> const& args,
|
||||||
int initWidth) :
|
int initWidth) :
|
||||||
|
@ -80,7 +80,7 @@ cmCursesMainForm::~cmCursesMainForm()
|
||||||
{
|
{
|
||||||
delete this->CMakeInstance;
|
delete this->CMakeInstance;
|
||||||
this->CMakeInstance = 0;
|
this->CMakeInstance = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// See if a cache entry is in the list of entries in the ui.
|
// See if a cache entry is in the list of entries in the ui.
|
||||||
|
@ -99,7 +99,7 @@ bool cmCursesMainForm::LookForCacheEntry(const char* key)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ void cmCursesMainForm::InitializeUI()
|
||||||
|
|
||||||
// Count non-internal and non-static entries
|
// Count non-internal and non-static entries
|
||||||
int count=0;
|
int count=0;
|
||||||
for(cmCacheManager::CacheIterator i =
|
for(cmCacheManager::CacheIterator i =
|
||||||
this->CMakeInstance->GetCacheManager()->NewIterator();
|
this->CMakeInstance->GetCacheManager()->NewIterator();
|
||||||
!i.IsAtEnd(); i.Next())
|
!i.IsAtEnd(); i.Next())
|
||||||
{
|
{
|
||||||
|
@ -142,12 +142,12 @@ void cmCursesMainForm::InitializeUI()
|
||||||
// Create the composites.
|
// Create the composites.
|
||||||
|
|
||||||
// First add entries which are new
|
// First add entries which are new
|
||||||
for(cmCacheManager::CacheIterator i =
|
for(cmCacheManager::CacheIterator i =
|
||||||
this->CMakeInstance->GetCacheManager()->NewIterator();
|
this->CMakeInstance->GetCacheManager()->NewIterator();
|
||||||
!i.IsAtEnd(); i.Next())
|
!i.IsAtEnd(); i.Next())
|
||||||
{
|
{
|
||||||
const char* key = i.GetName();
|
const char* key = i.GetName();
|
||||||
if ( i.GetType() == cmCacheManager::INTERNAL ||
|
if ( i.GetType() == cmCacheManager::INTERNAL ||
|
||||||
i.GetType() == cmCacheManager::STATIC ||
|
i.GetType() == cmCacheManager::STATIC ||
|
||||||
i.GetType() == cmCacheManager::UNINITIALIZED )
|
i.GetType() == cmCacheManager::UNINITIALIZED )
|
||||||
{
|
{
|
||||||
|
@ -164,12 +164,12 @@ void cmCursesMainForm::InitializeUI()
|
||||||
}
|
}
|
||||||
|
|
||||||
// then add entries which are old
|
// then add entries which are old
|
||||||
for(cmCacheManager::CacheIterator i =
|
for(cmCacheManager::CacheIterator i =
|
||||||
this->CMakeInstance->GetCacheManager()->NewIterator();
|
this->CMakeInstance->GetCacheManager()->NewIterator();
|
||||||
!i.IsAtEnd(); i.Next())
|
!i.IsAtEnd(); i.Next())
|
||||||
{
|
{
|
||||||
const char* key = i.GetName();
|
const char* key = i.GetName();
|
||||||
if ( i.GetType() == cmCacheManager::INTERNAL ||
|
if ( i.GetType() == cmCacheManager::INTERNAL ||
|
||||||
i.GetType() == cmCacheManager::STATIC ||
|
i.GetType() == cmCacheManager::STATIC ||
|
||||||
i.GetType() == cmCacheManager::UNINITIALIZED )
|
i.GetType() == cmCacheManager::UNINITIALIZED )
|
||||||
{
|
{
|
||||||
|
@ -184,7 +184,7 @@ void cmCursesMainForm::InitializeUI()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean old entries
|
// Clean old entries
|
||||||
if (this->Entries)
|
if (this->Entries)
|
||||||
{
|
{
|
||||||
|
@ -197,7 +197,7 @@ void cmCursesMainForm::InitializeUI()
|
||||||
}
|
}
|
||||||
delete this->Entries;
|
delete this->Entries;
|
||||||
this->Entries = newEntries;
|
this->Entries = newEntries;
|
||||||
|
|
||||||
// Compute fields from composites
|
// Compute fields from composites
|
||||||
this->RePost();
|
this->RePost();
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ void cmCursesMainForm::RePost()
|
||||||
std::vector<cmCursesCacheEntryComposite*>::iterator it;
|
std::vector<cmCursesCacheEntryComposite*>::iterator it;
|
||||||
for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
|
for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
|
||||||
{
|
{
|
||||||
cmCacheManager::CacheIterator mit =
|
cmCacheManager::CacheIterator mit =
|
||||||
this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
|
this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
|
||||||
if (mit.IsAtEnd() ||
|
if (mit.IsAtEnd() ||
|
||||||
(!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
|
(!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
|
||||||
|
@ -253,7 +253,7 @@ void cmCursesMainForm::RePost()
|
||||||
std::vector<cmCursesCacheEntryComposite*>::iterator it;
|
std::vector<cmCursesCacheEntryComposite*>::iterator it;
|
||||||
for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
|
for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
|
||||||
{
|
{
|
||||||
cmCacheManager::CacheIterator mit =
|
cmCacheManager::CacheIterator mit =
|
||||||
this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
|
this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
|
||||||
if (mit.IsAtEnd() ||
|
if (mit.IsAtEnd() ||
|
||||||
(!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
|
(!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
|
||||||
|
@ -301,7 +301,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrong window size
|
// Wrong window size
|
||||||
if ( width < cmCursesMainForm::MIN_WIDTH ||
|
if ( width < cmCursesMainForm::MIN_WIDTH ||
|
||||||
width < this->InitialWidth ||
|
width < this->InitialWidth ||
|
||||||
height < cmCursesMainForm::MIN_HEIGHT )
|
height < cmCursesMainForm::MIN_HEIGHT )
|
||||||
{
|
{
|
||||||
|
@ -322,7 +322,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
|
||||||
std::vector<cmCursesCacheEntryComposite*>::iterator it;
|
std::vector<cmCursesCacheEntryComposite*>::iterator it;
|
||||||
for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
|
for (it = this->Entries->begin(); it != this->Entries->end(); ++it)
|
||||||
{
|
{
|
||||||
cmCacheManager::CacheIterator mit =
|
cmCacheManager::CacheIterator mit =
|
||||||
this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
|
this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue());
|
||||||
if (mit.IsAtEnd() ||
|
if (mit.IsAtEnd() ||
|
||||||
(!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
|
(!this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")))
|
||||||
|
@ -372,7 +372,7 @@ void cmCursesMainForm::Render(int left, int top, int width, int height)
|
||||||
this->UpdateStatusBar();
|
this->UpdateStatusBar();
|
||||||
this->PrintKeys();
|
this->PrintKeys();
|
||||||
|
|
||||||
touchwin(stdscr);
|
touchwin(stdscr);
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
|
||||||
{
|
{
|
||||||
int x,y;
|
int x,y;
|
||||||
getmaxyx(stdscr, y, x);
|
getmaxyx(stdscr, y, x);
|
||||||
if ( x < cmCursesMainForm::MIN_WIDTH ||
|
if ( x < cmCursesMainForm::MIN_WIDTH ||
|
||||||
x < this->InitialWidth ||
|
x < this->InitialWidth ||
|
||||||
y < cmCursesMainForm::MIN_HEIGHT )
|
y < cmCursesMainForm::MIN_HEIGHT )
|
||||||
{
|
{
|
||||||
|
@ -399,7 +399,7 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
|
||||||
{
|
{
|
||||||
cw->PrintKeys();
|
cw->PrintKeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
|
@ -409,18 +409,18 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
|
||||||
char thirdLine[512]="";
|
char thirdLine[512]="";
|
||||||
if (process)
|
if (process)
|
||||||
{
|
{
|
||||||
sprintf(firstLine,
|
sprintf(firstLine,
|
||||||
" ");
|
" ");
|
||||||
sprintf(secondLine,
|
sprintf(secondLine,
|
||||||
" ");
|
" ");
|
||||||
sprintf(thirdLine,
|
sprintf(thirdLine,
|
||||||
" ");
|
" ");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (this->OkToGenerate)
|
if (this->OkToGenerate)
|
||||||
{
|
{
|
||||||
sprintf(firstLine,
|
sprintf(firstLine,
|
||||||
"Press [c] to configure Press [g] to generate and exit");
|
"Press [c] to configure Press [g] to generate and exit");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -435,8 +435,8 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
|
||||||
{
|
{
|
||||||
sprintf(thirdLine, "Press [t] to toggle advanced mode (Currently Off)");
|
sprintf(thirdLine, "Press [t] to toggle advanced mode (Currently Off)");
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(secondLine,
|
sprintf(secondLine,
|
||||||
"Press [h] for help Press [q] to quit without generating");
|
"Press [h] for help Press [q] to quit without generating");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
pos_form_cursor(this->Form);
|
pos_form_cursor(this->Form);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print the key of the current entry and the CMake version
|
// Print the key of the current entry and the CMake version
|
||||||
|
@ -473,7 +473,7 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
|
||||||
int x,y;
|
int x,y;
|
||||||
getmaxyx(stdscr, y, x);
|
getmaxyx(stdscr, y, x);
|
||||||
// If window size is too small, display error and return
|
// If window size is too small, display error and return
|
||||||
if ( x < cmCursesMainForm::MIN_WIDTH ||
|
if ( x < cmCursesMainForm::MIN_WIDTH ||
|
||||||
x < this->InitialWidth ||
|
x < this->InitialWidth ||
|
||||||
y < cmCursesMainForm::MIN_HEIGHT )
|
y < cmCursesMainForm::MIN_HEIGHT )
|
||||||
{
|
{
|
||||||
|
@ -482,10 +482,10 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
|
||||||
char fmt[] = "Window is too small. A size of at least %dx%d is required.";
|
char fmt[] = "Window is too small. A size of at least %dx%d is required.";
|
||||||
printw(fmt,
|
printw(fmt,
|
||||||
(cmCursesMainForm::MIN_WIDTH < this->InitialWidth ?
|
(cmCursesMainForm::MIN_WIDTH < this->InitialWidth ?
|
||||||
this->InitialWidth : cmCursesMainForm::MIN_WIDTH),
|
this->InitialWidth : cmCursesMainForm::MIN_WIDTH),
|
||||||
cmCursesMainForm::MIN_HEIGHT);
|
cmCursesMainForm::MIN_HEIGHT);
|
||||||
touchwin(stdscr);
|
touchwin(stdscr);
|
||||||
wrefresh(stdscr);
|
wrefresh(stdscr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,10 +502,10 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
|
||||||
if ( lbl )
|
if ( lbl )
|
||||||
{
|
{
|
||||||
curField = lbl->GetValue();
|
curField = lbl->GetValue();
|
||||||
|
|
||||||
// Get the help string of the current entry
|
// Get the help string of the current entry
|
||||||
// and add it to the help string
|
// and add it to the help string
|
||||||
cmCacheManager::CacheIterator it =
|
cmCacheManager::CacheIterator it =
|
||||||
this->CMakeInstance->GetCacheManager()->GetCacheIterator(curField);
|
this->CMakeInstance->GetCacheManager()->GetCacheIterator(curField);
|
||||||
if (!it.IsAtEnd())
|
if (!it.IsAtEnd())
|
||||||
{
|
{
|
||||||
|
@ -549,9 +549,9 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
|
||||||
if ( curFieldLen < width )
|
if ( curFieldLen < width )
|
||||||
{
|
{
|
||||||
strcpy(bar, curField);
|
strcpy(bar, curField);
|
||||||
for(i=curFieldLen; i < width; ++i)
|
for(i=curFieldLen; i < width; ++i)
|
||||||
{
|
{
|
||||||
bar[i] = ' ';
|
bar[i] = ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -578,14 +578,14 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcpy(bar+curFieldLen+2, help);
|
strcpy(bar+curFieldLen+2, help);
|
||||||
for(i=curFieldLen+helpLen+2; i < width; ++i)
|
for(i=curFieldLen+helpLen+2; i < width; ++i)
|
||||||
{
|
{
|
||||||
bar[i] = ' ';
|
bar[i] = ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bar[width] = '\0';
|
bar[width] = '\0';
|
||||||
|
|
||||||
|
@ -605,7 +605,7 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
|
||||||
attron(A_STANDOUT);
|
attron(A_STANDOUT);
|
||||||
char format[] = "%s";
|
char format[] = "%s";
|
||||||
printw(format, bar);
|
printw(format, bar);
|
||||||
attroff(A_STANDOUT);
|
attroff(A_STANDOUT);
|
||||||
curses_move(y-4,0);
|
curses_move(y-4,0);
|
||||||
printw(version);
|
printw(version);
|
||||||
pos_form_cursor(this->Form);
|
pos_form_cursor(this->Form);
|
||||||
|
@ -631,7 +631,7 @@ void cmCursesMainForm::UpdateProgress(const char *msg, float prog, void* vp)
|
||||||
cm->UpdateStatusBar(cmsg);
|
cm->UpdateStatusBar(cmsg);
|
||||||
cm->PrintKeys(1);
|
cm->PrintKeys(1);
|
||||||
curses_move(1,1);
|
curses_move(1,1);
|
||||||
touchwin(stdscr);
|
touchwin(stdscr);
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -643,7 +643,7 @@ int cmCursesMainForm::Configure(int noconfigure)
|
||||||
curses_move(1,1);
|
curses_move(1,1);
|
||||||
this->UpdateStatusBar("Configuring, please wait...");
|
this->UpdateStatusBar("Configuring, please wait...");
|
||||||
this->PrintKeys(1);
|
this->PrintKeys(1);
|
||||||
touchwin(stdscr);
|
touchwin(stdscr);
|
||||||
refresh();
|
refresh();
|
||||||
this->CMakeInstance->SetProgressCallback(cmCursesMainForm::UpdateProgress, this);
|
this->CMakeInstance->SetProgressCallback(cmCursesMainForm::UpdateProgress, this);
|
||||||
|
|
||||||
|
@ -652,7 +652,7 @@ int cmCursesMainForm::Configure(int noconfigure)
|
||||||
this->CMakeInstance->GetCacheManager()->SaveCache(
|
this->CMakeInstance->GetCacheManager()->SaveCache(
|
||||||
this->CMakeInstance->GetHomeOutputDirectory());
|
this->CMakeInstance->GetHomeOutputDirectory());
|
||||||
this->LoadCache(0);
|
this->LoadCache(0);
|
||||||
|
|
||||||
// Get rid of previous errors
|
// Get rid of previous errors
|
||||||
this->Errors = std::vector<std::string>();
|
this->Errors = std::vector<std::string>();
|
||||||
|
|
||||||
|
@ -674,8 +674,8 @@ int cmCursesMainForm::Configure(int noconfigure)
|
||||||
}
|
}
|
||||||
this->CMakeInstance->SetProgressCallback(0, 0);
|
this->CMakeInstance->SetProgressCallback(0, 0);
|
||||||
|
|
||||||
keypad(stdscr,TRUE); /* Use key symbols as
|
keypad(stdscr,TRUE); /* Use key symbols as
|
||||||
KEY_DOWN*/
|
KEY_DOWN*/
|
||||||
|
|
||||||
if( retVal != 0 || !this->Errors.empty())
|
if( retVal != 0 || !this->Errors.empty())
|
||||||
{
|
{
|
||||||
|
@ -705,10 +705,10 @@ int cmCursesMainForm::Configure(int noconfigure)
|
||||||
CurrentForm = this;
|
CurrentForm = this;
|
||||||
this->Render(1,1,xx,yy);
|
this->Render(1,1,xx,yy);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->InitializeUI();
|
this->InitializeUI();
|
||||||
this->Render(1, 1, xi, yi);
|
this->Render(1, 1, xi, yi);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -731,8 +731,8 @@ int cmCursesMainForm::Generate()
|
||||||
int retVal = this->CMakeInstance->Generate();
|
int retVal = this->CMakeInstance->Generate();
|
||||||
|
|
||||||
this->CMakeInstance->SetProgressCallback(0, 0);
|
this->CMakeInstance->SetProgressCallback(0, 0);
|
||||||
keypad(stdscr,TRUE); /* Use key symbols as
|
keypad(stdscr,TRUE); /* Use key symbols as
|
||||||
KEY_DOWN*/
|
KEY_DOWN*/
|
||||||
|
|
||||||
if( retVal != 0 || !this->Errors.empty())
|
if( retVal != 0 || !this->Errors.empty())
|
||||||
{
|
{
|
||||||
|
@ -764,10 +764,10 @@ int cmCursesMainForm::Generate()
|
||||||
CurrentForm = this;
|
CurrentForm = this;
|
||||||
this->Render(1,1,xx,yy);
|
this->Render(1,1,xx,yy);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->InitializeUI();
|
this->InitializeUI();
|
||||||
this->Render(1, 1, xi, yi);
|
this->Render(1, 1, xi, yi);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -798,11 +798,11 @@ void cmCursesMainForm::RemoveEntry(const char* value)
|
||||||
|
|
||||||
// copy from the list box to the cache manager
|
// copy from the list box to the cache manager
|
||||||
void cmCursesMainForm::FillCacheManagerFromUI()
|
void cmCursesMainForm::FillCacheManagerFromUI()
|
||||||
{
|
{
|
||||||
size_t size = this->Entries->size();
|
size_t size = this->Entries->size();
|
||||||
for(size_t i=0; i < size; i++)
|
for(size_t i=0; i < size; i++)
|
||||||
{
|
{
|
||||||
cmCacheManager::CacheIterator it =
|
cmCacheManager::CacheIterator it =
|
||||||
this->CMakeInstance->GetCacheManager()->GetCacheIterator(
|
this->CMakeInstance->GetCacheManager()->GetCacheIterator(
|
||||||
(*this->Entries)[i]->Key.c_str());
|
(*this->Entries)[i]->Key.c_str());
|
||||||
if (!it.IsAtEnd())
|
if (!it.IsAtEnd())
|
||||||
|
@ -872,14 +872,14 @@ void cmCursesMainForm::HandleInput()
|
||||||
this->PrintKeys(1);
|
this->PrintKeys(1);
|
||||||
curses_move(y-5,static_cast<unsigned int>(searchstr.size()));
|
curses_move(y-5,static_cast<unsigned int>(searchstr.size()));
|
||||||
//curses_move(1,1);
|
//curses_move(1,1);
|
||||||
touchwin(stdscr);
|
touchwin(stdscr);
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
int key = getch();
|
int key = getch();
|
||||||
|
|
||||||
getmaxyx(stdscr, y, x);
|
getmaxyx(stdscr, y, x);
|
||||||
// If window too small, handle 'q' only
|
// If window too small, handle 'q' only
|
||||||
if ( x < cmCursesMainForm::MIN_WIDTH ||
|
if ( x < cmCursesMainForm::MIN_WIDTH ||
|
||||||
y < cmCursesMainForm::MIN_HEIGHT )
|
y < cmCursesMainForm::MIN_HEIGHT )
|
||||||
{
|
{
|
||||||
// quit
|
// quit
|
||||||
|
@ -948,7 +948,7 @@ void cmCursesMainForm::HandleInput()
|
||||||
}
|
}
|
||||||
if ((!currentWidget || !widgetHandled) && !this->SearchMode)
|
if ((!currentWidget || !widgetHandled) && !this->SearchMode)
|
||||||
{
|
{
|
||||||
// If the current widget does not want to handle input,
|
// If the current widget does not want to handle input,
|
||||||
// we handle it.
|
// we handle it.
|
||||||
sprintf(debugMessage, "Main form handling input, key: %d", key);
|
sprintf(debugMessage, "Main form handling input, key: %d", key);
|
||||||
cmCursesForm::LogMessage(debugMessage);
|
cmCursesForm::LogMessage(debugMessage);
|
||||||
|
@ -1028,7 +1028,7 @@ void cmCursesMainForm::HandleInput()
|
||||||
this->Fields[findex-2]));
|
this->Fields[findex-2]));
|
||||||
const char* curField = lbl->GetValue();
|
const char* curField = lbl->GetValue();
|
||||||
const char* helpString=0;
|
const char* helpString=0;
|
||||||
cmCacheManager::CacheIterator it =
|
cmCacheManager::CacheIterator it =
|
||||||
this->CMakeInstance->GetCacheManager()->GetCacheIterator(curField);
|
this->CMakeInstance->GetCacheManager()->GetCacheIterator(curField);
|
||||||
if (!it.IsAtEnd())
|
if (!it.IsAtEnd())
|
||||||
{
|
{
|
||||||
|
@ -1052,7 +1052,7 @@ void cmCursesMainForm::HandleInput()
|
||||||
CurrentForm = msgs;
|
CurrentForm = msgs;
|
||||||
msgs->Render(1,1,x,y);
|
msgs->Render(1,1,x,y);
|
||||||
msgs->HandleInput();
|
msgs->HandleInput();
|
||||||
CurrentForm = this;
|
CurrentForm = this;
|
||||||
this->Render(1,1,x,y);
|
this->Render(1,1,x,y);
|
||||||
set_current_field(this->Form, cur);
|
set_current_field(this->Form, cur);
|
||||||
}
|
}
|
||||||
|
@ -1137,7 +1137,7 @@ void cmCursesMainForm::HandleInput()
|
||||||
// each entry consists of fields: label, isnew, value
|
// each entry consists of fields: label, isnew, value
|
||||||
// therefore, the label field for the is findex-2
|
// therefore, the label field for the is findex-2
|
||||||
// (findex always corresponds to the value field)
|
// (findex always corresponds to the value field)
|
||||||
cmCursesWidget* lbl
|
cmCursesWidget* lbl
|
||||||
= reinterpret_cast<cmCursesWidget*>(
|
= reinterpret_cast<cmCursesWidget*>(
|
||||||
field_userptr(this->Fields[findex-2]));
|
field_userptr(this->Fields[findex-2]));
|
||||||
if ( lbl )
|
if ( lbl )
|
||||||
|
@ -1177,15 +1177,15 @@ void cmCursesMainForm::HandleInput()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
touchwin(stdscr);
|
touchwin(stdscr);
|
||||||
wrefresh(stdscr);
|
wrefresh(stdscr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int cmCursesMainForm::LoadCache(const char *)
|
int cmCursesMainForm::LoadCache(const char *)
|
||||||
|
|
||||||
{
|
{
|
||||||
int r = this->CMakeInstance->LoadCache();
|
int r = this->CMakeInstance->LoadCache();
|
||||||
if(r < 0)
|
if(r < 0)
|
||||||
{
|
{
|
||||||
return r;
|
return r;
|
||||||
|
@ -1194,7 +1194,7 @@ int cmCursesMainForm::LoadCache(const char *)
|
||||||
this->CMakeInstance->PreLoadCMakeFiles();
|
this->CMakeInstance->PreLoadCMakeFiles();
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmCursesMainForm::JumpToCacheEntry(const char* astr)
|
void cmCursesMainForm::JumpToCacheEntry(const char* astr)
|
||||||
{
|
{
|
||||||
std::string str;
|
std::string str;
|
||||||
|
@ -1247,7 +1247,7 @@ void cmCursesMainForm::JumpToCacheEntry(const char* astr)
|
||||||
/*
|
/*
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
sprintf(buffer, "Line: %d != %d / %d\n", findex, idx, this->NumberOfVisibleEntries);
|
sprintf(buffer, "Line: %d != %d / %d\n", findex, idx, this->NumberOfVisibleEntries);
|
||||||
touchwin(stdscr);
|
touchwin(stdscr);
|
||||||
refresh();
|
refresh();
|
||||||
this->UpdateStatusBar( buffer );
|
this->UpdateStatusBar( buffer );
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
|
@ -1262,7 +1262,7 @@ void cmCursesMainForm::JumpToCacheEntry(const char* astr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char* cmCursesMainForm::s_ConstHelpMessage =
|
const char* cmCursesMainForm::s_ConstHelpMessage =
|
||||||
"CMake is used to configure and generate build files for software projects. "
|
"CMake is used to configure and generate build files for software projects. "
|
||||||
"The basic steps for configuring a project with ccmake are as follows:\n\n"
|
"The basic steps for configuring a project with ccmake are as follows:\n\n"
|
||||||
"1. Run ccmake in the directory where you want the object and executable files to be placed (build directory). If the source directory is not the same as this build directory, you have to specify it as an argument on the command line.\n\n"
|
"1. Run ccmake in the directory where you want the object and executable files to be placed (build directory). If the source directory is not the same as this build directory, you have to specify it as an argument on the command line.\n\n"
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||||
|
|
||||||
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
||||||
* if you want the limit (max/min) macros for int types.
|
* if you want the limit (max/min) macros for int types.
|
||||||
*/
|
*/
|
||||||
#ifndef __STDC_LIMIT_MACROS
|
#ifndef __STDC_LIMIT_MACROS
|
||||||
#define __STDC_LIMIT_MACROS 1
|
#define __STDC_LIMIT_MACROS 1
|
||||||
|
@ -64,7 +64,7 @@ typedef uint32_t flex_uint32_t;
|
||||||
typedef signed char flex_int8_t;
|
typedef signed char flex_int8_t;
|
||||||
typedef short int flex_int16_t;
|
typedef short int flex_int16_t;
|
||||||
typedef int flex_int32_t;
|
typedef int flex_int32_t;
|
||||||
typedef unsigned char flex_uint8_t;
|
typedef unsigned char flex_uint8_t;
|
||||||
typedef unsigned short int flex_uint16_t;
|
typedef unsigned short int flex_uint16_t;
|
||||||
typedef unsigned int flex_uint32_t;
|
typedef unsigned int flex_uint32_t;
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||||
#define EOB_ACT_LAST_MATCH 2
|
#define EOB_ACT_LAST_MATCH 2
|
||||||
|
|
||||||
#define YY_LESS_LINENO(n)
|
#define YY_LESS_LINENO(n)
|
||||||
|
|
||||||
/* Return all but the first "n" matched characters back to the input stream. */
|
/* Return all but the first "n" matched characters back to the input stream. */
|
||||||
#define yyless(n) \
|
#define yyless(n) \
|
||||||
do \
|
do \
|
||||||
|
@ -251,7 +251,7 @@ struct yy_buffer_state
|
||||||
|
|
||||||
int yy_bs_lineno; /**< The line count. */
|
int yy_bs_lineno; /**< The line count. */
|
||||||
int yy_bs_column; /**< The column count. */
|
int yy_bs_column; /**< The column count. */
|
||||||
|
|
||||||
/* Whether to try to fill the input buffer when we reach the
|
/* Whether to try to fill the input buffer when we reach the
|
||||||
* end of it.
|
* end of it.
|
||||||
*/
|
*/
|
||||||
|
@ -832,25 +832,25 @@ YY_RULE_SETUP
|
||||||
case 2:
|
case 2:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 72 "cmCommandArgumentLexer.in.l"
|
#line 72 "cmCommandArgumentLexer.in.l"
|
||||||
{
|
{
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
|
yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
|
||||||
return cal_NCURLY;
|
return cal_NCURLY;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 78 "cmCommandArgumentLexer.in.l"
|
#line 78 "cmCommandArgumentLexer.in.l"
|
||||||
{
|
{
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
|
yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2);
|
||||||
return cal_ATNAME;
|
return cal_ATNAME;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 84 "cmCommandArgumentLexer.in.l"
|
#line 84 "cmCommandArgumentLexer.in.l"
|
||||||
{
|
{
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->DCURLYVariable;
|
yylvalp->str = yyextra->DCURLYVariable;
|
||||||
return cal_DCURLY;
|
return cal_DCURLY;
|
||||||
}
|
}
|
||||||
|
@ -859,7 +859,7 @@ YY_RULE_SETUP
|
||||||
#line 91 "cmCommandArgumentLexer.in.l"
|
#line 91 "cmCommandArgumentLexer.in.l"
|
||||||
{
|
{
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->RCURLYVariable;
|
yylvalp->str = yyextra->RCURLYVariable;
|
||||||
return cal_RCURLY;
|
return cal_RCURLY;
|
||||||
}
|
}
|
||||||
|
@ -868,17 +868,17 @@ YY_RULE_SETUP
|
||||||
#line 98 "cmCommandArgumentLexer.in.l"
|
#line 98 "cmCommandArgumentLexer.in.l"
|
||||||
{
|
{
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->ATVariable;
|
yylvalp->str = yyextra->ATVariable;
|
||||||
return cal_AT;
|
return cal_AT;
|
||||||
}
|
}
|
||||||
case 7:
|
case 7:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 105 "cmCommandArgumentLexer.in.l"
|
#line 105 "cmCommandArgumentLexer.in.l"
|
||||||
{
|
{
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
return cal_NAME;
|
return cal_NAME;
|
||||||
}
|
}
|
||||||
case 8:
|
case 8:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
|
@ -888,40 +888,40 @@ YY_RULE_SETUP
|
||||||
{
|
{
|
||||||
return cal_ERROR;
|
return cal_ERROR;
|
||||||
}
|
}
|
||||||
return cal_SYMBOL;
|
return cal_SYMBOL;
|
||||||
}
|
}
|
||||||
case 9:
|
case 9:
|
||||||
/* rule 9 can match eol */
|
/* rule 9 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 119 "cmCommandArgumentLexer.in.l"
|
#line 119 "cmCommandArgumentLexer.in.l"
|
||||||
{
|
{
|
||||||
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
|
||||||
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
return cal_SYMBOL;
|
return cal_SYMBOL;
|
||||||
}
|
}
|
||||||
case 10:
|
case 10:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 125 "cmCommandArgumentLexer.in.l"
|
#line 125 "cmCommandArgumentLexer.in.l"
|
||||||
{
|
{
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->DOLLARVariable;
|
yylvalp->str = yyextra->DOLLARVariable;
|
||||||
return cal_DOLLAR;
|
return cal_DOLLAR;
|
||||||
}
|
}
|
||||||
case 11:
|
case 11:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 131 "cmCommandArgumentLexer.in.l"
|
#line 131 "cmCommandArgumentLexer.in.l"
|
||||||
{
|
{
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->LCURLYVariable;
|
yylvalp->str = yyextra->LCURLYVariable;
|
||||||
return cal_LCURLY;
|
return cal_LCURLY;
|
||||||
}
|
}
|
||||||
case 12:
|
case 12:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 137 "cmCommandArgumentLexer.in.l"
|
#line 137 "cmCommandArgumentLexer.in.l"
|
||||||
{
|
{
|
||||||
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
yylvalp->str = yyextra->BSLASHVariable;
|
yylvalp->str = yyextra->BSLASHVariable;
|
||||||
return cal_BSLASH;
|
return cal_BSLASH;
|
||||||
}
|
}
|
||||||
case 13:
|
case 13:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
|
@ -1419,7 +1419,7 @@ static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner)
|
||||||
YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
|
YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
YY_BUFFER_STATE b;
|
YY_BUFFER_STATE b;
|
||||||
|
|
||||||
b = (YY_BUFFER_STATE) cmCommandArgument_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
|
b = (YY_BUFFER_STATE) cmCommandArgument_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
|
||||||
if ( ! b )
|
if ( ! b )
|
||||||
YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_create_buffer()" );
|
YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_create_buffer()" );
|
||||||
|
@ -1463,7 +1463,7 @@ static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner)
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
extern int isatty (int );
|
extern int isatty (int );
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
/* Initializes or reinitializes a buffer.
|
/* Initializes or reinitializes a buffer.
|
||||||
* This function is sometimes called more than once on the same buffer,
|
* This function is sometimes called more than once on the same buffer,
|
||||||
* such as during a cmCommandArgument_yyrestart() or at EOF.
|
* such as during a cmCommandArgument_yyrestart() or at EOF.
|
||||||
|
@ -1489,7 +1489,7 @@ extern int isatty (int );
|
||||||
}
|
}
|
||||||
|
|
||||||
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
||||||
|
|
||||||
errno = oerrno;
|
errno = oerrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1595,9 +1595,9 @@ static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner)
|
||||||
, yyscanner);
|
, yyscanner);
|
||||||
if ( ! yyg->yy_buffer_stack )
|
if ( ! yyg->yy_buffer_stack )
|
||||||
YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yyensure_buffer_stack()" );
|
YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yyensure_buffer_stack()" );
|
||||||
|
|
||||||
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
||||||
|
|
||||||
yyg->yy_buffer_stack_max = num_to_alloc;
|
yyg->yy_buffer_stack_max = num_to_alloc;
|
||||||
yyg->yy_buffer_stack_top = 0;
|
yyg->yy_buffer_stack_top = 0;
|
||||||
return;
|
return;
|
||||||
|
@ -1626,12 +1626,12 @@ static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner)
|
||||||
* @param base the character buffer
|
* @param base the character buffer
|
||||||
* @param size the size in bytes of the character buffer
|
* @param size the size in bytes of the character buffer
|
||||||
* @param yyscanner The scanner object.
|
* @param yyscanner The scanner object.
|
||||||
* @return the newly allocated buffer state object.
|
* @return the newly allocated buffer state object.
|
||||||
*/
|
*/
|
||||||
YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
|
YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
YY_BUFFER_STATE b;
|
YY_BUFFER_STATE b;
|
||||||
|
|
||||||
if ( size < 2 ||
|
if ( size < 2 ||
|
||||||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
||||||
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
||||||
|
@ -1667,7 +1667,7 @@ YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char * base, yy_size_t size
|
||||||
*/
|
*/
|
||||||
YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
|
YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
|
|
||||||
return cmCommandArgument_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
|
return cmCommandArgument_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1684,7 +1684,7 @@ YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char * yybytes, int _
|
||||||
char *buf;
|
char *buf;
|
||||||
yy_size_t n;
|
yy_size_t n;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||||
n = _yybytes_len + 2;
|
n = _yybytes_len + 2;
|
||||||
buf = (char *) cmCommandArgument_yyalloc(n ,yyscanner );
|
buf = (char *) cmCommandArgument_yyalloc(n ,yyscanner );
|
||||||
|
@ -1752,10 +1752,10 @@ YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner)
|
||||||
int cmCommandArgument_yyget_lineno (yyscan_t yyscanner)
|
int cmCommandArgument_yyget_lineno (yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||||
|
|
||||||
if (! YY_CURRENT_BUFFER)
|
if (! YY_CURRENT_BUFFER)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return yylineno;
|
return yylineno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1765,10 +1765,10 @@ int cmCommandArgument_yyget_lineno (yyscan_t yyscanner)
|
||||||
int cmCommandArgument_yyget_column (yyscan_t yyscanner)
|
int cmCommandArgument_yyget_column (yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||||
|
|
||||||
if (! YY_CURRENT_BUFFER)
|
if (! YY_CURRENT_BUFFER)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return yycolumn;
|
return yycolumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1829,8 +1829,8 @@ void cmCommandArgument_yyset_lineno (int line_number , yyscan_t yyscanner)
|
||||||
|
|
||||||
/* lineno is only valid if an input buffer exists. */
|
/* lineno is only valid if an input buffer exists. */
|
||||||
if (! YY_CURRENT_BUFFER )
|
if (! YY_CURRENT_BUFFER )
|
||||||
yy_fatal_error( "cmCommandArgument_yyset_lineno called with no buffer" , yyscanner);
|
yy_fatal_error( "cmCommandArgument_yyset_lineno called with no buffer" , yyscanner);
|
||||||
|
|
||||||
yylineno = line_number;
|
yylineno = line_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1844,8 +1844,8 @@ void cmCommandArgument_yyset_column (int column_no , yyscan_t yyscanner)
|
||||||
|
|
||||||
/* column is only valid if an input buffer exists. */
|
/* column is only valid if an input buffer exists. */
|
||||||
if (! YY_CURRENT_BUFFER )
|
if (! YY_CURRENT_BUFFER )
|
||||||
yy_fatal_error( "cmCommandArgument_yyset_column called with no buffer" , yyscanner);
|
yy_fatal_error( "cmCommandArgument_yyset_column called with no buffer" , yyscanner);
|
||||||
|
|
||||||
yycolumn = column_no;
|
yycolumn = column_no;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1928,20 +1928,20 @@ int cmCommandArgument_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* p
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
*ptr_yy_globals = (yyscan_t) cmCommandArgument_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
|
*ptr_yy_globals = (yyscan_t) cmCommandArgument_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
|
||||||
|
|
||||||
if (*ptr_yy_globals == NULL){
|
if (*ptr_yy_globals == NULL){
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* By setting to 0xAA, we expose bugs in
|
/* By setting to 0xAA, we expose bugs in
|
||||||
yy_init_globals. Leave at 0x00 for releases. */
|
yy_init_globals. Leave at 0x00 for releases. */
|
||||||
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
|
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
|
||||||
|
|
||||||
cmCommandArgument_yyset_extra (yy_user_defined, *ptr_yy_globals);
|
cmCommandArgument_yyset_extra (yy_user_defined, *ptr_yy_globals);
|
||||||
|
|
||||||
return yy_init_globals ( *ptr_yy_globals );
|
return yy_init_globals ( *ptr_yy_globals );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ typedef uint32_t flex_uint32_t;
|
||||||
typedef signed char flex_int8_t;
|
typedef signed char flex_int8_t;
|
||||||
typedef short int flex_int16_t;
|
typedef short int flex_int16_t;
|
||||||
typedef int flex_int32_t;
|
typedef int flex_int32_t;
|
||||||
typedef unsigned char flex_uint8_t;
|
typedef unsigned char flex_uint8_t;
|
||||||
typedef unsigned short int flex_uint16_t;
|
typedef unsigned short int flex_uint16_t;
|
||||||
typedef unsigned int flex_uint32_t;
|
typedef unsigned int flex_uint32_t;
|
||||||
#endif /* ! C99 */
|
#endif /* ! C99 */
|
||||||
|
@ -169,7 +169,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||||
#define EOB_ACT_LAST_MATCH 2
|
#define EOB_ACT_LAST_MATCH 2
|
||||||
|
|
||||||
#define YY_LESS_LINENO(n)
|
#define YY_LESS_LINENO(n)
|
||||||
|
|
||||||
/* Return all but the first "n" matched characters back to the input stream. */
|
/* Return all but the first "n" matched characters back to the input stream. */
|
||||||
#define yyless(n) \
|
#define yyless(n) \
|
||||||
do \
|
do \
|
||||||
|
@ -234,7 +234,7 @@ struct yy_buffer_state
|
||||||
|
|
||||||
int yy_bs_lineno; /**< The line count. */
|
int yy_bs_lineno; /**< The line count. */
|
||||||
int yy_bs_column; /**< The column count. */
|
int yy_bs_column; /**< The column count. */
|
||||||
|
|
||||||
/* Whether to try to fill the input buffer when we reach the
|
/* Whether to try to fill the input buffer when we reach the
|
||||||
* end of it.
|
* end of it.
|
||||||
*/
|
*/
|
||||||
|
@ -1428,9 +1428,9 @@ YY_RULE_SETUP
|
||||||
case 107:
|
case 107:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 200 "cmDependsJavaLexer.in.l"
|
#line 200 "cmDependsJavaLexer.in.l"
|
||||||
{
|
{
|
||||||
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
|
||||||
return jp_NAME;
|
return jp_NAME;
|
||||||
}
|
}
|
||||||
case 108:
|
case 108:
|
||||||
/* rule 108 can match eol */
|
/* rule 108 can match eol */
|
||||||
|
@ -1447,11 +1447,11 @@ YY_RULE_SETUP
|
||||||
case 110:
|
case 110:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 207 "cmDependsJavaLexer.in.l"
|
#line 207 "cmDependsJavaLexer.in.l"
|
||||||
{
|
{
|
||||||
std::cerr << "Unknown character: " << yytext[0]
|
std::cerr << "Unknown character: " << yytext[0]
|
||||||
<< " (" << (int)yytext[0] << ")" << std::endl;
|
<< " (" << (int)yytext[0] << ")" << std::endl;
|
||||||
yyextra->Error("Unknown character");
|
yyextra->Error("Unknown character");
|
||||||
return jp_ERROR;
|
return jp_ERROR;
|
||||||
}
|
}
|
||||||
case 111:
|
case 111:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
|
@ -1933,7 +1933,7 @@ static void cmDependsJava_yy_load_buffer_state (yyscan_t yyscanner)
|
||||||
YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
|
YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
YY_BUFFER_STATE b;
|
YY_BUFFER_STATE b;
|
||||||
|
|
||||||
b = (YY_BUFFER_STATE) cmDependsJava_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
|
b = (YY_BUFFER_STATE) cmDependsJava_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
|
||||||
if ( ! b )
|
if ( ! b )
|
||||||
YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_create_buffer()" );
|
YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_create_buffer()" );
|
||||||
|
@ -1977,7 +1977,7 @@ static void cmDependsJava_yy_load_buffer_state (yyscan_t yyscanner)
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
extern int isatty (int );
|
extern int isatty (int );
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
/* Initializes or reinitializes a buffer.
|
/* Initializes or reinitializes a buffer.
|
||||||
* This function is sometimes called more than once on the same buffer,
|
* This function is sometimes called more than once on the same buffer,
|
||||||
* such as during a cmDependsJava_yyrestart() or at EOF.
|
* such as during a cmDependsJava_yyrestart() or at EOF.
|
||||||
|
@ -2003,7 +2003,7 @@ extern int isatty (int );
|
||||||
}
|
}
|
||||||
|
|
||||||
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
||||||
|
|
||||||
errno = oerrno;
|
errno = oerrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2107,9 +2107,9 @@ static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner)
|
||||||
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsJava_yyalloc
|
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsJava_yyalloc
|
||||||
(nuto_alloc * sizeof(struct yy_buffer_state*)
|
(nuto_alloc * sizeof(struct yy_buffer_state*)
|
||||||
, yyscanner);
|
, yyscanner);
|
||||||
|
|
||||||
memset(yyg->yy_buffer_stack, 0, nuto_alloc * sizeof(struct yy_buffer_state*));
|
memset(yyg->yy_buffer_stack, 0, nuto_alloc * sizeof(struct yy_buffer_state*));
|
||||||
|
|
||||||
yyg->yy_buffer_stack_max = nuto_alloc;
|
yyg->yy_buffer_stack_max = nuto_alloc;
|
||||||
yyg->yy_buffer_stack_top = 0;
|
yyg->yy_buffer_stack_top = 0;
|
||||||
return;
|
return;
|
||||||
|
@ -2136,12 +2136,12 @@ static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner)
|
||||||
* @param base the character buffer
|
* @param base the character buffer
|
||||||
* @param size the size in bytes of the character buffer
|
* @param size the size in bytes of the character buffer
|
||||||
* @param yyscanner The scanner object.
|
* @param yyscanner The scanner object.
|
||||||
* @return the newly allocated buffer state object.
|
* @return the newly allocated buffer state object.
|
||||||
*/
|
*/
|
||||||
YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
|
YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
YY_BUFFER_STATE b;
|
YY_BUFFER_STATE b;
|
||||||
|
|
||||||
if ( size < 2 ||
|
if ( size < 2 ||
|
||||||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
||||||
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
||||||
|
@ -2177,7 +2177,7 @@ YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char * base, yy_size_t size , yy
|
||||||
*/
|
*/
|
||||||
YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner)
|
YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
|
|
||||||
return cmDependsJava_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner);
|
return cmDependsJava_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2194,7 +2194,7 @@ YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char * bytes, int len , y
|
||||||
char *buf;
|
char *buf;
|
||||||
yy_size_t n;
|
yy_size_t n;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||||
n = len + 2;
|
n = len + 2;
|
||||||
buf = (char *) cmDependsJava_yyalloc(n ,yyscanner );
|
buf = (char *) cmDependsJava_yyalloc(n ,yyscanner );
|
||||||
|
@ -2262,10 +2262,10 @@ YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner)
|
||||||
int cmDependsJava_yyget_lineno (yyscan_t yyscanner)
|
int cmDependsJava_yyget_lineno (yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||||
|
|
||||||
if (! YY_CURRENT_BUFFER)
|
if (! YY_CURRENT_BUFFER)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return yylineno;
|
return yylineno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2275,10 +2275,10 @@ int cmDependsJava_yyget_lineno (yyscan_t yyscanner)
|
||||||
int cmDependsJava_yyget_column (yyscan_t yyscanner)
|
int cmDependsJava_yyget_column (yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||||
|
|
||||||
if (! YY_CURRENT_BUFFER)
|
if (! YY_CURRENT_BUFFER)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return yycolumn;
|
return yycolumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2339,8 +2339,8 @@ void cmDependsJava_yyset_lineno (int line_number , yyscan_t yyscanner)
|
||||||
|
|
||||||
/* lineno is only valid if an input buffer exists. */
|
/* lineno is only valid if an input buffer exists. */
|
||||||
if (! YY_CURRENT_BUFFER )
|
if (! YY_CURRENT_BUFFER )
|
||||||
yy_fatal_error( "cmDependsJava_yyset_lineno called with no buffer" , yyscanner);
|
yy_fatal_error( "cmDependsJava_yyset_lineno called with no buffer" , yyscanner);
|
||||||
|
|
||||||
yylineno = line_number;
|
yylineno = line_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2354,8 +2354,8 @@ void cmDependsJava_yyset_column (int column_no , yyscan_t yyscanner)
|
||||||
|
|
||||||
/* column is only valid if an input buffer exists. */
|
/* column is only valid if an input buffer exists. */
|
||||||
if (! YY_CURRENT_BUFFER )
|
if (! YY_CURRENT_BUFFER )
|
||||||
yy_fatal_error( "cmDependsJava_yyset_column called with no buffer" , yyscanner);
|
yy_fatal_error( "cmDependsJava_yyset_column called with no buffer" , yyscanner);
|
||||||
|
|
||||||
yycolumn = column_no;
|
yycolumn = column_no;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -235,24 +235,24 @@ cmDocumentation::cmDocumentation()
|
||||||
|
|
||||||
sec = new cmDocumentationSection("See Also","SEE ALSO");
|
sec = new cmDocumentationSection("See Also","SEE ALSO");
|
||||||
sec->Append(cmDocumentationStandardSeeAlso);
|
sec->Append(cmDocumentationStandardSeeAlso);
|
||||||
this->AllSections["Standard See Also"] = sec;
|
this->AllSections["Standard See Also"] = sec;
|
||||||
|
|
||||||
sec = new cmDocumentationSection("Options","OPTIONS");
|
sec = new cmDocumentationSection("Options","OPTIONS");
|
||||||
sec->Append(cmDocumentationStandardOptions);
|
sec->Append(cmDocumentationStandardOptions);
|
||||||
this->AllSections["Options"] = sec;
|
this->AllSections["Options"] = sec;
|
||||||
|
|
||||||
sec = new cmDocumentationSection("Properties","PROPERTIES");
|
sec = new cmDocumentationSection("Properties","PROPERTIES");
|
||||||
sec->Append(cmPropertiesDocumentationDescription);
|
sec->Append(cmPropertiesDocumentationDescription);
|
||||||
this->AllSections["Properties Description"] = sec;
|
this->AllSections["Properties Description"] = sec;
|
||||||
|
|
||||||
sec = new cmDocumentationSection("Generators","GENERATORS");
|
sec = new cmDocumentationSection("Generators","GENERATORS");
|
||||||
sec->Append(cmDocumentationGeneratorsHeader);
|
sec->Append(cmDocumentationGeneratorsHeader);
|
||||||
this->AllSections["Generators"] = sec;
|
this->AllSections["Generators"] = sec;
|
||||||
|
|
||||||
sec = new cmDocumentationSection("Compatibility Commands",
|
sec = new cmDocumentationSection("Compatibility Commands",
|
||||||
"COMPATIBILITY COMMANDS");
|
"COMPATIBILITY COMMANDS");
|
||||||
sec->Append(cmCompatCommandsDocumentationDescription);
|
sec->Append(cmCompatCommandsDocumentationDescription);
|
||||||
this->AllSections["Compatibility Commands"] = sec;
|
this->AllSections["Compatibility Commands"] = sec;
|
||||||
|
|
||||||
|
|
||||||
this->PropertySections.push_back("Properties of Global Scope");
|
this->PropertySections.push_back("Properties of Global Scope");
|
||||||
|
@ -279,7 +279,7 @@ cmDocumentation::~cmDocumentation()
|
||||||
{
|
{
|
||||||
delete [] *i;
|
delete [] *i;
|
||||||
}
|
}
|
||||||
for(std::map<std::string,cmDocumentationSection *>::iterator i =
|
for(std::map<std::string,cmDocumentationSection *>::iterator i =
|
||||||
this->AllSections.begin();
|
this->AllSections.begin();
|
||||||
i != this->AllSections.end(); ++i)
|
i != this->AllSections.end(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -314,7 +314,7 @@ bool cmDocumentation::PrintCopyright(std::ostream& os)
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmDocumentation::PrintVersion(std::ostream& os)
|
bool cmDocumentation::PrintVersion(std::ostream& os)
|
||||||
{
|
{
|
||||||
os << this->GetNameString() << " version "
|
os << this->GetNameString() << " version "
|
||||||
<< cmVersion::GetCMakeVersion() << "\n";
|
<< cmVersion::GetCMakeVersion() << "\n";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@ void cmDocumentation::AddSectionToPrint(const char *section)
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::ClearSections()
|
void cmDocumentation::ClearSections()
|
||||||
{
|
{
|
||||||
this->PrintSections.erase(this->PrintSections.begin(),
|
this->PrintSections.erase(this->PrintSections.begin(),
|
||||||
this->PrintSections.end());
|
this->PrintSections.end());
|
||||||
this->ModulesFound.clear();
|
this->ModulesFound.clear();
|
||||||
}
|
}
|
||||||
|
@ -359,7 +359,7 @@ void cmDocumentation::AddDocumentIntroToPrint(const char* intro[2])
|
||||||
bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os,
|
bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os,
|
||||||
const char* docname)
|
const char* docname)
|
||||||
{
|
{
|
||||||
if ((this->CurrentFormatter->GetForm() != HTMLForm)
|
if ((this->CurrentFormatter->GetForm() != HTMLForm)
|
||||||
&& (this->CurrentFormatter->GetForm() != DocbookForm)
|
&& (this->CurrentFormatter->GetForm() != DocbookForm)
|
||||||
&& (this->CurrentFormatter->GetForm() != ManForm))
|
&& (this->CurrentFormatter->GetForm() != ManForm))
|
||||||
{
|
{
|
||||||
|
@ -394,8 +394,8 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os,
|
||||||
this->PrintDocumentationList(os,"Commands");
|
this->PrintDocumentationList(os,"Commands");
|
||||||
this->PrintDocumentationList(os,"Compatibility Commands");
|
this->PrintDocumentationList(os,"Compatibility Commands");
|
||||||
return true;
|
return true;
|
||||||
case cmDocumentation::ModuleList:
|
case cmDocumentation::ModuleList:
|
||||||
// find the modules first, print the custom module docs only if
|
// find the modules first, print the custom module docs only if
|
||||||
// any custom modules have been found actually, Alex
|
// any custom modules have been found actually, Alex
|
||||||
this->CreateCustomModulesSection();
|
this->CreateCustomModulesSection();
|
||||||
this->CreateModulesSection();
|
this->CreateModulesSection();
|
||||||
|
@ -406,43 +406,43 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os,
|
||||||
}
|
}
|
||||||
this->PrintDocumentationList(os,"Modules");
|
this->PrintDocumentationList(os,"Modules");
|
||||||
return true;
|
return true;
|
||||||
case cmDocumentation::PropertyList:
|
case cmDocumentation::PropertyList:
|
||||||
this->PrintDocumentationList(os,"Properties Description");
|
this->PrintDocumentationList(os,"Properties Description");
|
||||||
for (std::vector<std::string>::iterator i =
|
for (std::vector<std::string>::iterator i =
|
||||||
this->PropertySections.begin();
|
this->PropertySections.begin();
|
||||||
i != this->PropertySections.end(); ++i)
|
i != this->PropertySections.end(); ++i)
|
||||||
{
|
{
|
||||||
this->PrintDocumentationList(os,i->c_str());
|
this->PrintDocumentationList(os,i->c_str());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case cmDocumentation::VariableList:
|
case cmDocumentation::VariableList:
|
||||||
for (std::vector<std::string>::iterator i =
|
for (std::vector<std::string>::iterator i =
|
||||||
this->VariableSections.begin();
|
this->VariableSections.begin();
|
||||||
i != this->VariableSections.end(); ++i)
|
i != this->VariableSections.end(); ++i)
|
||||||
{
|
{
|
||||||
this->PrintDocumentationList(os,i->c_str());
|
this->PrintDocumentationList(os,i->c_str());
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case cmDocumentation::Full:
|
case cmDocumentation::Full:
|
||||||
return this->PrintDocumentationFull(os);
|
return this->PrintDocumentationFull(os);
|
||||||
case cmDocumentation::Modules:
|
case cmDocumentation::Modules:
|
||||||
return this->PrintDocumentationModules(os);
|
return this->PrintDocumentationModules(os);
|
||||||
case cmDocumentation::CustomModules:
|
case cmDocumentation::CustomModules:
|
||||||
return this->PrintDocumentationCustomModules(os);
|
return this->PrintDocumentationCustomModules(os);
|
||||||
case cmDocumentation::Policies:
|
case cmDocumentation::Policies:
|
||||||
return this->PrintDocumentationPolicies(os);
|
return this->PrintDocumentationPolicies(os);
|
||||||
case cmDocumentation::Properties:
|
case cmDocumentation::Properties:
|
||||||
return this->PrintDocumentationProperties(os);
|
return this->PrintDocumentationProperties(os);
|
||||||
case cmDocumentation::Variables:
|
case cmDocumentation::Variables:
|
||||||
return this->PrintDocumentationVariables(os);
|
return this->PrintDocumentationVariables(os);
|
||||||
case cmDocumentation::Commands:
|
case cmDocumentation::Commands:
|
||||||
return this->PrintDocumentationCurrentCommands(os);
|
return this->PrintDocumentationCurrentCommands(os);
|
||||||
case cmDocumentation::CompatCommands:
|
case cmDocumentation::CompatCommands:
|
||||||
return this->PrintDocumentationCompatCommands(os);
|
return this->PrintDocumentationCompatCommands(os);
|
||||||
|
|
||||||
case cmDocumentation::Copyright:
|
case cmDocumentation::Copyright:
|
||||||
return this->PrintCopyright(os);
|
return this->PrintCopyright(os);
|
||||||
case cmDocumentation::Version:
|
case cmDocumentation::Version:
|
||||||
return true;
|
return true;
|
||||||
default: return false;
|
default: return false;
|
||||||
}
|
}
|
||||||
|
@ -451,7 +451,7 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os,
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmDocumentation::CreateModulesSection()
|
bool cmDocumentation::CreateModulesSection()
|
||||||
{
|
{
|
||||||
cmDocumentationSection *sec =
|
cmDocumentationSection *sec =
|
||||||
new cmDocumentationSection("Standard CMake Modules", "MODULES");
|
new cmDocumentationSection("Standard CMake Modules", "MODULES");
|
||||||
this->AllSections["Modules"] = sec;
|
this->AllSections["Modules"] = sec;
|
||||||
std::string cmakeModules = this->CMakeRoot;
|
std::string cmakeModules = this->CMakeRoot;
|
||||||
|
@ -485,7 +485,7 @@ bool cmDocumentation::CreateCustomModulesSection()
|
||||||
{
|
{
|
||||||
if (!sectionHasHeader)
|
if (!sectionHasHeader)
|
||||||
{
|
{
|
||||||
cmDocumentationSection *sec =
|
cmDocumentationSection *sec =
|
||||||
new cmDocumentationSection("Custom CMake Modules","CUSTOM MODULES");
|
new cmDocumentationSection("Custom CMake Modules","CUSTOM MODULES");
|
||||||
this->AllSections["Custom CMake Modules"] = sec;
|
this->AllSections["Custom CMake Modules"] = sec;
|
||||||
sec->Append(cmDocumentationCustomModulesHeader[0]);
|
sec->Append(cmDocumentationCustomModulesHeader[0]);
|
||||||
|
@ -502,10 +502,10 @@ bool cmDocumentation::CreateCustomModulesSection()
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation
|
void cmDocumentation
|
||||||
::CreateModuleDocsForDir(cmsys::Directory& dir,
|
::CreateModuleDocsForDir(cmsys::Directory& dir,
|
||||||
cmDocumentationSection &moduleSection)
|
cmDocumentationSection &moduleSection)
|
||||||
{
|
{
|
||||||
// sort the files alphabetically, so the docs for one module are easier
|
// sort the files alphabetically, so the docs for one module are easier
|
||||||
// to find than if they are in random order
|
// to find than if they are in random order
|
||||||
std::vector<std::string> sortedFiles;
|
std::vector<std::string> sortedFiles;
|
||||||
for(unsigned int i = 0; i < dir.GetNumberOfFiles(); ++i)
|
for(unsigned int i = 0; i < dir.GetNumberOfFiles(); ++i)
|
||||||
|
@ -530,7 +530,7 @@ void cmDocumentation
|
||||||
std::string path = dir.GetPath();
|
std::string path = dir.GetPath();
|
||||||
path += "/";
|
path += "/";
|
||||||
path += (*fname);
|
path += (*fname);
|
||||||
this->CreateSingleModule(path.c_str(), moduleName.c_str(),
|
this->CreateSingleModule(path.c_str(), moduleName.c_str(),
|
||||||
moduleSection);
|
moduleSection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -539,7 +539,7 @@ void cmDocumentation
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmDocumentation::CreateSingleModule(const char* fname,
|
bool cmDocumentation::CreateSingleModule(const char* fname,
|
||||||
const char* moduleName,
|
const char* moduleName,
|
||||||
cmDocumentationSection &moduleSection)
|
cmDocumentationSection &moduleSection)
|
||||||
{
|
{
|
||||||
|
@ -548,7 +548,7 @@ bool cmDocumentation::CreateSingleModule(const char* fname,
|
||||||
{
|
{
|
||||||
std::cerr << "Internal error: can not open module." << fname << std::endl;
|
std::cerr << "Internal error: can not open module." << fname << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string line;
|
std::string line;
|
||||||
std::string text;
|
std::string text;
|
||||||
std::string brief;
|
std::string brief;
|
||||||
|
@ -561,14 +561,14 @@ bool cmDocumentation::CreateSingleModule(const char* fname,
|
||||||
// blank line
|
// blank line
|
||||||
if(line.size() <= 2)
|
if(line.size() <= 2)
|
||||||
{
|
{
|
||||||
text += "\n";
|
text += "\n";
|
||||||
newParagraph = true;
|
newParagraph = true;
|
||||||
}
|
}
|
||||||
else if(line[2] == '-')
|
else if(line[2] == '-')
|
||||||
{
|
{
|
||||||
brief = line.c_str()+4;
|
brief = line.c_str()+4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// two spaces
|
// two spaces
|
||||||
if(line[1] == ' ' && line[2] == ' ')
|
if(line[1] == ' ' && line[2] == ' ')
|
||||||
|
@ -630,11 +630,11 @@ bool cmDocumentation::CreateSingleModule(const char* fname,
|
||||||
bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os)
|
bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os)
|
||||||
{
|
{
|
||||||
bool result = true;
|
bool result = true;
|
||||||
|
|
||||||
// Loop over requested documentation types.
|
// Loop over requested documentation types.
|
||||||
for(std::vector<RequestedHelpItem>::const_iterator
|
for(std::vector<RequestedHelpItem>::const_iterator
|
||||||
i = this->RequestedHelpItems.begin();
|
i = this->RequestedHelpItems.begin();
|
||||||
i != this->RequestedHelpItems.end();
|
i != this->RequestedHelpItems.end();
|
||||||
++i)
|
++i)
|
||||||
{
|
{
|
||||||
this->SetForm(i->HelpForm);
|
this->SetForm(i->HelpForm);
|
||||||
|
@ -660,13 +660,13 @@ bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os)
|
||||||
docname = cmSystemTools::GetFilenameWithoutLastExtension(i->Filename);
|
docname = cmSystemTools::GetFilenameWithoutLastExtension(i->Filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print this documentation type to the stream.
|
// Print this documentation type to the stream.
|
||||||
if(!this->PrintDocumentation(i->HelpType, *s, docname.c_str()) || !*s)
|
if(!this->PrintDocumentation(i->HelpType, *s, docname.c_str()) || !*s)
|
||||||
{
|
{
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close the file if we wrote one.
|
// Close the file if we wrote one.
|
||||||
if(fout)
|
if(fout)
|
||||||
{
|
{
|
||||||
|
@ -876,8 +876,8 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
|
||||||
GET_OPT_ARGUMENT(help.Filename);
|
GET_OPT_ARGUMENT(help.Filename);
|
||||||
help.HelpForm = cmDocumentation::UsageForm;
|
help.HelpForm = cmDocumentation::UsageForm;
|
||||||
}
|
}
|
||||||
else if((strcmp(argv[i], "--version") == 0) ||
|
else if((strcmp(argv[i], "--version") == 0) ||
|
||||||
(strcmp(argv[i], "-version") == 0) ||
|
(strcmp(argv[i], "-version") == 0) ||
|
||||||
(strcmp(argv[i], "/V") == 0))
|
(strcmp(argv[i], "/V") == 0))
|
||||||
{
|
{
|
||||||
help.HelpType = cmDocumentation::Version;
|
help.HelpType = cmDocumentation::Version;
|
||||||
|
@ -904,14 +904,14 @@ void cmDocumentation::Print(Form f, std::ostream& os)
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::Print(std::ostream& os)
|
void cmDocumentation::Print(std::ostream& os)
|
||||||
{
|
{
|
||||||
// if the formatter supports it, print a master index for
|
// if the formatter supports it, print a master index for
|
||||||
// all sections
|
// all sections
|
||||||
this->CurrentFormatter->PrintIndex(os, this->PrintSections);
|
this->CurrentFormatter->PrintIndex(os, this->PrintSections);
|
||||||
for(unsigned int i=0; i < this->PrintSections.size(); ++i)
|
for(unsigned int i=0; i < this->PrintSections.size(); ++i)
|
||||||
{
|
{
|
||||||
std::string name = this->PrintSections[i]->
|
std::string name = this->PrintSections[i]->
|
||||||
GetName((this->CurrentFormatter->GetForm()));
|
GetName((this->CurrentFormatter->GetForm()));
|
||||||
this->CurrentFormatter->PrintSection(os,*this->PrintSections[i],
|
this->CurrentFormatter->PrintSection(os,*this->PrintSections[i],
|
||||||
name.c_str());
|
name.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -929,7 +929,7 @@ void cmDocumentation::SetDocName(const char *docname)
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::SetSection(const char *name,
|
void cmDocumentation::SetSection(const char *name,
|
||||||
cmDocumentationSection *section)
|
cmDocumentationSection *section)
|
||||||
{
|
{
|
||||||
if (this->AllSections.find(name) != this->AllSections.end())
|
if (this->AllSections.find(name) != this->AllSections.end())
|
||||||
|
@ -940,22 +940,22 @@ void cmDocumentation::SetSection(const char *name,
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::SetSection(const char *name,
|
void cmDocumentation::SetSection(const char *name,
|
||||||
std::vector<cmDocumentationEntry> &docs)
|
std::vector<cmDocumentationEntry> &docs)
|
||||||
{
|
{
|
||||||
cmDocumentationSection *sec =
|
cmDocumentationSection *sec =
|
||||||
new cmDocumentationSection(name,
|
new cmDocumentationSection(name,
|
||||||
cmSystemTools::UpperCase(name).c_str());
|
cmSystemTools::UpperCase(name).c_str());
|
||||||
sec->Append(docs);
|
sec->Append(docs);
|
||||||
this->SetSection(name,sec);
|
this->SetSection(name,sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::SetSection(const char *name,
|
void cmDocumentation::SetSection(const char *name,
|
||||||
const char *docs[][3])
|
const char *docs[][3])
|
||||||
{
|
{
|
||||||
cmDocumentationSection *sec =
|
cmDocumentationSection *sec =
|
||||||
new cmDocumentationSection(name,
|
new cmDocumentationSection(name,
|
||||||
cmSystemTools::UpperCase(name).c_str());
|
cmSystemTools::UpperCase(name).c_str());
|
||||||
sec->Append(docs);
|
sec->Append(docs);
|
||||||
this->SetSection(name,sec);
|
this->SetSection(name,sec);
|
||||||
|
@ -965,15 +965,15 @@ void cmDocumentation::SetSection(const char *name,
|
||||||
void cmDocumentation
|
void cmDocumentation
|
||||||
::SetSections(std::map<std::string,cmDocumentationSection *> §ions)
|
::SetSections(std::map<std::string,cmDocumentationSection *> §ions)
|
||||||
{
|
{
|
||||||
for (std::map<std::string,cmDocumentationSection *>::const_iterator
|
for (std::map<std::string,cmDocumentationSection *>::const_iterator
|
||||||
it = sections.begin(); it != sections.end(); ++it)
|
it = sections.begin(); it != sections.end(); ++it)
|
||||||
{
|
{
|
||||||
this->SetSection(it->first.c_str(),it->second);
|
this->SetSection(it->first.c_str(),it->second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::PrependSection(const char *name,
|
void cmDocumentation::PrependSection(const char *name,
|
||||||
const char *docs[][3])
|
const char *docs[][3])
|
||||||
{
|
{
|
||||||
cmDocumentationSection *sec = 0;
|
cmDocumentationSection *sec = 0;
|
||||||
|
@ -991,7 +991,7 @@ void cmDocumentation::PrependSection(const char *name,
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::PrependSection(const char *name,
|
void cmDocumentation::PrependSection(const char *name,
|
||||||
std::vector<cmDocumentationEntry> &docs)
|
std::vector<cmDocumentationEntry> &docs)
|
||||||
{
|
{
|
||||||
cmDocumentationSection *sec = 0;
|
cmDocumentationSection *sec = 0;
|
||||||
|
@ -1009,7 +1009,7 @@ void cmDocumentation::PrependSection(const char *name,
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::AppendSection(const char *name,
|
void cmDocumentation::AppendSection(const char *name,
|
||||||
const char *docs[][3])
|
const char *docs[][3])
|
||||||
{
|
{
|
||||||
cmDocumentationSection *sec = 0;
|
cmDocumentationSection *sec = 0;
|
||||||
|
@ -1027,7 +1027,7 @@ void cmDocumentation::AppendSection(const char *name,
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::AppendSection(const char *name,
|
void cmDocumentation::AppendSection(const char *name,
|
||||||
std::vector<cmDocumentationEntry> &docs)
|
std::vector<cmDocumentationEntry> &docs)
|
||||||
{
|
{
|
||||||
cmDocumentationSection *sec = 0;
|
cmDocumentationSection *sec = 0;
|
||||||
|
@ -1045,7 +1045,7 @@ void cmDocumentation::AppendSection(const char *name,
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::AppendSection(const char *name,
|
void cmDocumentation::AppendSection(const char *name,
|
||||||
cmDocumentationEntry &docs)
|
cmDocumentationEntry &docs)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1055,7 +1055,7 @@ void cmDocumentation::AppendSection(const char *name,
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::PrependSection(const char *name,
|
void cmDocumentation::PrependSection(const char *name,
|
||||||
cmDocumentationEntry &docs)
|
cmDocumentationEntry &docs)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1067,7 +1067,7 @@ void cmDocumentation::PrependSection(const char *name,
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmDocumentation::SetSeeAlsoList(const char *data[][3])
|
void cmDocumentation::SetSeeAlsoList(const char *data[][3])
|
||||||
{
|
{
|
||||||
cmDocumentationSection *sec =
|
cmDocumentationSection *sec =
|
||||||
new cmDocumentationSection("See Also", "SEE ALSO");
|
new cmDocumentationSection("See Also", "SEE ALSO");
|
||||||
this->AllSections["See Also"] = sec;
|
this->AllSections["See Also"] = sec;
|
||||||
this->SeeAlsoString = ".B ";
|
this->SeeAlsoString = ".B ";
|
||||||
|
@ -1075,7 +1075,7 @@ void cmDocumentation::SetSeeAlsoList(const char *data[][3])
|
||||||
while(data[i][1])
|
while(data[i][1])
|
||||||
{
|
{
|
||||||
this->SeeAlsoString += data[i][1];
|
this->SeeAlsoString += data[i][1];
|
||||||
this->SeeAlsoString += data[i+1][1]? "(1), ":"(1)";
|
this->SeeAlsoString += data[i+1][1]? "(1), ":"(1)";
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
sec->Append(0,this->SeeAlsoString.c_str(),0);
|
sec->Append(0,this->SeeAlsoString.c_str(),0);
|
||||||
|
@ -1096,9 +1096,9 @@ bool cmDocumentation::PrintDocumentationGeneric(std::ostream& os,
|
||||||
os << "Required argument missing.\n";
|
os << "Required argument missing.\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const std::vector<cmDocumentationEntry> &entries =
|
const std::vector<cmDocumentationEntry> &entries =
|
||||||
this->AllSections[section]->GetEntries();
|
this->AllSections[section]->GetEntries();
|
||||||
for(std::vector<cmDocumentationEntry>::const_iterator ei =
|
for(std::vector<cmDocumentationEntry>::const_iterator ei =
|
||||||
entries.begin();
|
entries.begin();
|
||||||
ei != entries.end(); ++ei)
|
ei != entries.end(); ++ei)
|
||||||
{
|
{
|
||||||
|
@ -1138,7 +1138,7 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os)
|
||||||
os << "Argument --help-module needs a module name.\n";
|
os << "Argument --help-module needs a module name.\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string moduleName;
|
std::string moduleName;
|
||||||
// find the module
|
// find the module
|
||||||
std::vector<std::string> dirs;
|
std::vector<std::string> dirs;
|
||||||
|
@ -1172,10 +1172,10 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os)
|
||||||
|
|
||||||
if(!moduleName.empty())
|
if(!moduleName.empty())
|
||||||
{
|
{
|
||||||
cmDocumentationSection *sec =
|
cmDocumentationSection *sec =
|
||||||
new cmDocumentationSection("Standard CMake Modules", "MODULES");
|
new cmDocumentationSection("Standard CMake Modules", "MODULES");
|
||||||
this->AllSections["Modules"] = sec;
|
this->AllSections["Modules"] = sec;
|
||||||
if (this->CreateSingleModule(moduleName.c_str(),
|
if (this->CreateSingleModule(moduleName.c_str(),
|
||||||
this->CurrentArgument.c_str(),
|
this->CurrentArgument.c_str(),
|
||||||
*this->AllSections["Modules"]))
|
*this->AllSections["Modules"]))
|
||||||
{
|
{
|
||||||
|
@ -1204,7 +1204,7 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os)
|
||||||
bool cmDocumentation::PrintDocumentationSingleProperty(std::ostream& os)
|
bool cmDocumentation::PrintDocumentationSingleProperty(std::ostream& os)
|
||||||
{
|
{
|
||||||
bool done = false;
|
bool done = false;
|
||||||
for (std::vector<std::string>::iterator i =
|
for (std::vector<std::string>::iterator i =
|
||||||
this->PropertySections.begin();
|
this->PropertySections.begin();
|
||||||
!done && i != this->PropertySections.end(); ++i)
|
!done && i != this->PropertySections.end(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -1241,7 +1241,7 @@ bool cmDocumentation::PrintDocumentationSinglePolicy(std::ostream& os)
|
||||||
bool cmDocumentation::PrintDocumentationSingleVariable(std::ostream& os)
|
bool cmDocumentation::PrintDocumentationSingleVariable(std::ostream& os)
|
||||||
{
|
{
|
||||||
bool done = false;
|
bool done = false;
|
||||||
for (std::vector<std::string>::iterator i =
|
for (std::vector<std::string>::iterator i =
|
||||||
this->VariableSections.begin();
|
this->VariableSections.begin();
|
||||||
!done && i != this->VariableSections.end(); ++i)
|
!done && i != this->VariableSections.end(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -1270,9 +1270,9 @@ bool cmDocumentation::PrintDocumentationList(std::ostream& os,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<cmDocumentationEntry> &entries =
|
const std::vector<cmDocumentationEntry> &entries =
|
||||||
this->AllSections[section]->GetEntries();
|
this->AllSections[section]->GetEntries();
|
||||||
for(std::vector<cmDocumentationEntry>::const_iterator ei =
|
for(std::vector<cmDocumentationEntry>::const_iterator ei =
|
||||||
entries.begin();
|
entries.begin();
|
||||||
ei != entries.end(); ++ei)
|
ei != entries.end(); ++ei)
|
||||||
{
|
{
|
||||||
|
@ -1364,7 +1364,7 @@ bool cmDocumentation::PrintDocumentationProperties(std::ostream& os)
|
||||||
this->ClearSections();
|
this->ClearSections();
|
||||||
this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Properties));
|
this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Properties));
|
||||||
this->AddSectionToPrint("Properties Description");
|
this->AddSectionToPrint("Properties Description");
|
||||||
for (std::vector<std::string>::iterator i =
|
for (std::vector<std::string>::iterator i =
|
||||||
this->PropertySections.begin();
|
this->PropertySections.begin();
|
||||||
i != this->PropertySections.end(); ++i)
|
i != this->PropertySections.end(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -1383,7 +1383,7 @@ bool cmDocumentation::PrintDocumentationVariables(std::ostream& os)
|
||||||
{
|
{
|
||||||
this->ClearSections();
|
this->ClearSections();
|
||||||
this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Variables));
|
this->AddDocumentIntroToPrint(GET_DOCUMENT_INTRO(Variables));
|
||||||
for (std::vector<std::string>::iterator i =
|
for (std::vector<std::string>::iterator i =
|
||||||
this->VariableSections.begin();
|
this->VariableSections.begin();
|
||||||
i != this->VariableSections.end(); ++i)
|
i != this->VariableSections.end(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -1464,10 +1464,10 @@ void cmDocumentation::CreateFullDocumentation()
|
||||||
this->AddSectionToPrint("Commands");
|
this->AddSectionToPrint("Commands");
|
||||||
emitted.insert("Commands");
|
emitted.insert("Commands");
|
||||||
|
|
||||||
|
|
||||||
this->AddSectionToPrint("Properties Description");
|
this->AddSectionToPrint("Properties Description");
|
||||||
emitted.insert("Properties Description");
|
emitted.insert("Properties Description");
|
||||||
for (std::vector<std::string>::iterator i =
|
for (std::vector<std::string>::iterator i =
|
||||||
this->PropertySections.begin();
|
this->PropertySections.begin();
|
||||||
i != this->PropertySections.end(); ++i)
|
i != this->PropertySections.end(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -1481,7 +1481,7 @@ void cmDocumentation::CreateFullDocumentation()
|
||||||
emitted.insert("Author");
|
emitted.insert("Author");
|
||||||
|
|
||||||
// add any sections not yet written out, or to be written out
|
// add any sections not yet written out, or to be written out
|
||||||
for (std::map<std::string, cmDocumentationSection*>::iterator i =
|
for (std::map<std::string, cmDocumentationSection*>::iterator i =
|
||||||
this->AllSections.begin();
|
this->AllSections.begin();
|
||||||
i != this->AllSections.end(); ++i)
|
i != this->AllSections.end(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -1579,6 +1579,6 @@ const char* cmDocumentation::GetDefaultDocName(Type ht) const
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmDocumentation::IsOption(const char* arg) const
|
bool cmDocumentation::IsOption(const char* arg) const
|
||||||
{
|
{
|
||||||
return ((arg[0] == '-') || (strcmp(arg, "/V") == 0) ||
|
return ((arg[0] == '-') || (strcmp(arg, "/V") == 0) ||
|
||||||
(strcmp(arg, "/?") == 0));
|
(strcmp(arg, "/?") == 0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
/** This is just a helper class to make it build with MSVC 6.0.
|
/** This is just a helper class to make it build with MSVC 6.0.
|
||||||
Actually the enums and internal classes could directly go into
|
Actually the enums and internal classes could directly go into
|
||||||
cmDocumentation, but then MSVC6 complains in RequestedHelpItem that
|
cmDocumentation, but then MSVC6 complains in RequestedHelpItem that
|
||||||
cmDocumentation is an undefined type and so it doesn't know the enums.
|
cmDocumentation is an undefined type and so it doesn't know the enums.
|
||||||
Moving the enums to a class which is then already completely parsed helps
|
Moving the enums to a class which is then already completely parsed helps
|
||||||
against this. */
|
against this. */
|
||||||
|
@ -24,10 +24,10 @@ class cmDocumentationEnums
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** Types of help provided. */
|
/** Types of help provided. */
|
||||||
enum Type
|
enum Type
|
||||||
{ None, Usage, Single, SingleModule, SingleProperty, SingleVariable,
|
{ None, Usage, Single, SingleModule, SingleProperty, SingleVariable,
|
||||||
List, ModuleList, PropertyList, VariableList,
|
List, ModuleList, PropertyList, VariableList,
|
||||||
Full, Properties, Variables, Modules, CustomModules, Commands,
|
Full, Properties, Variables, Modules, CustomModules, Commands,
|
||||||
CompatCommands, Copyright, Version, Policies, SinglePolicy };
|
CompatCommands, Copyright, Version, Policies, SinglePolicy };
|
||||||
|
|
||||||
/** Forms of documentation output. */
|
/** Forms of documentation output. */
|
||||||
|
@ -36,7 +36,7 @@ public:
|
||||||
|
|
||||||
class cmDocumentationSection;
|
class cmDocumentationSection;
|
||||||
|
|
||||||
/** Base class for printing the documentation in the various supported
|
/** Base class for printing the documentation in the various supported
|
||||||
formats. */
|
formats. */
|
||||||
class cmDocumentationFormatter
|
class cmDocumentationFormatter
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ public:
|
||||||
void PrintFormatted(std::ostream& os, const char* text);
|
void PrintFormatted(std::ostream& os, const char* text);
|
||||||
|
|
||||||
virtual cmDocumentationEnums::Form GetForm() const = 0;
|
virtual cmDocumentationEnums::Form GetForm() const = 0;
|
||||||
|
|
||||||
virtual void PrintHeader(const char* /*docname*/,
|
virtual void PrintHeader(const char* /*docname*/,
|
||||||
const char* /*appname*/,
|
const char* /*appname*/,
|
||||||
std::ostream& /*os*/) {}
|
std::ostream& /*os*/) {}
|
||||||
|
|
|
@ -44,7 +44,7 @@ typedef uint32_t flex_uint32_t;
|
||||||
typedef signed char flex_int8_t;
|
typedef signed char flex_int8_t;
|
||||||
typedef short int flex_int16_t;
|
typedef short int flex_int16_t;
|
||||||
typedef int flex_int32_t;
|
typedef int flex_int32_t;
|
||||||
typedef unsigned char flex_uint8_t;
|
typedef unsigned char flex_uint8_t;
|
||||||
typedef unsigned short int flex_uint16_t;
|
typedef unsigned short int flex_uint16_t;
|
||||||
typedef unsigned int flex_uint32_t;
|
typedef unsigned int flex_uint32_t;
|
||||||
#endif /* ! C99 */
|
#endif /* ! C99 */
|
||||||
|
@ -165,7 +165,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||||||
#define EOB_ACT_LAST_MATCH 2
|
#define EOB_ACT_LAST_MATCH 2
|
||||||
|
|
||||||
#define YY_LESS_LINENO(n)
|
#define YY_LESS_LINENO(n)
|
||||||
|
|
||||||
/* Return all but the first "n" matched characters back to the input
|
/* Return all but the first "n" matched characters back to the input
|
||||||
stream. */
|
stream. */
|
||||||
#define yyless(n) \
|
#define yyless(n) \
|
||||||
|
@ -231,7 +231,7 @@ struct yy_buffer_state
|
||||||
|
|
||||||
int yy_bs_lineno; /**< The line count. */
|
int yy_bs_lineno; /**< The line count. */
|
||||||
int yy_bs_column; /**< The column count. */
|
int yy_bs_column; /**< The column count. */
|
||||||
|
|
||||||
/* Whether to try to fill the input buffer when we reach the
|
/* Whether to try to fill the input buffer when we reach the
|
||||||
* end of it.
|
* end of it.
|
||||||
*/
|
*/
|
||||||
|
@ -787,7 +787,7 @@ do_action: /* This label is used only to access EOF actions. */
|
||||||
case 1:
|
case 1:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 88 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 88 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
{ yylvalp->Number = atoi(yytext); return exp_NUMBER; }
|
{ yylvalp->Number = atoi(yytext); return exp_NUMBER; }
|
||||||
case 2:
|
case 2:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 90 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 90 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
|
@ -795,43 +795,43 @@ YY_RULE_SETUP
|
||||||
case 3:
|
case 3:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 91 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 91 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
{ return exp_MINUS; }
|
{ return exp_MINUS; }
|
||||||
case 4:
|
case 4:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 92 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 92 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
{ return exp_TIMES; }
|
{ return exp_TIMES; }
|
||||||
case 5:
|
case 5:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 93 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 93 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
{ return exp_DIVIDE; }
|
{ return exp_DIVIDE; }
|
||||||
case 6:
|
case 6:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 94 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 94 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
{ return exp_MOD; }
|
{ return exp_MOD; }
|
||||||
case 7:
|
case 7:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 95 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 95 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
{ return exp_OR; }
|
{ return exp_OR; }
|
||||||
case 8:
|
case 8:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 96 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 96 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
{ return exp_AND; }
|
{ return exp_AND; }
|
||||||
case 9:
|
case 9:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 97 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 97 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
{ return exp_XOR; }
|
{ return exp_XOR; }
|
||||||
case 10:
|
case 10:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 98 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 98 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
{ return exp_NOT; }
|
{ return exp_NOT; }
|
||||||
case 11:
|
case 11:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 99 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 99 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
{ return exp_SHIFTLEFT; }
|
{ return exp_SHIFTLEFT; }
|
||||||
case 12:
|
case 12:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 100 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 100 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
{ return exp_SHIFTRIGHT; }
|
{ return exp_SHIFTRIGHT; }
|
||||||
case 13:
|
case 13:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 101 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
#line 101 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
|
||||||
|
@ -1319,7 +1319,7 @@ static void cmExpr_yy_load_buffer_state (yyscan_t yyscanner)
|
||||||
YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
|
YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
YY_BUFFER_STATE b;
|
YY_BUFFER_STATE b;
|
||||||
|
|
||||||
b = (YY_BUFFER_STATE) cmExpr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
|
b = (YY_BUFFER_STATE) cmExpr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
|
||||||
if ( ! b )
|
if ( ! b )
|
||||||
YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_create_buffer()" );
|
YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_create_buffer()" );
|
||||||
|
@ -1363,7 +1363,7 @@ static void cmExpr_yy_load_buffer_state (yyscan_t yyscanner)
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
extern int isatty (int );
|
extern int isatty (int );
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
/* Initializes or reinitializes a buffer.
|
/* Initializes or reinitializes a buffer.
|
||||||
* This function is sometimes called more than once on the same buffer,
|
* This function is sometimes called more than once on the same buffer,
|
||||||
* such as during a cmExpr_yyrestart() or at EOF.
|
* such as during a cmExpr_yyrestart() or at EOF.
|
||||||
|
@ -1389,7 +1389,7 @@ extern int isatty (int );
|
||||||
}
|
}
|
||||||
|
|
||||||
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
||||||
|
|
||||||
errno = oerrno;
|
errno = oerrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1493,9 +1493,9 @@ static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner)
|
||||||
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmExpr_yyalloc
|
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmExpr_yyalloc
|
||||||
(nuto_alloc * sizeof(struct yy_buffer_state*)
|
(nuto_alloc * sizeof(struct yy_buffer_state*)
|
||||||
, yyscanner);
|
, yyscanner);
|
||||||
|
|
||||||
memset(yyg->yy_buffer_stack, 0, nuto_alloc * sizeof(struct yy_buffer_state*));
|
memset(yyg->yy_buffer_stack, 0, nuto_alloc * sizeof(struct yy_buffer_state*));
|
||||||
|
|
||||||
yyg->yy_buffer_stack_max = nuto_alloc;
|
yyg->yy_buffer_stack_max = nuto_alloc;
|
||||||
yyg->yy_buffer_stack_top = 0;
|
yyg->yy_buffer_stack_top = 0;
|
||||||
return;
|
return;
|
||||||
|
@ -1522,12 +1522,12 @@ static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner)
|
||||||
* @param base the character buffer
|
* @param base the character buffer
|
||||||
* @param size the size in bytes of the character buffer
|
* @param size the size in bytes of the character buffer
|
||||||
* @param yyscanner The scanner object.
|
* @param yyscanner The scanner object.
|
||||||
* @return the newly allocated buffer state object.
|
* @return the newly allocated buffer state object.
|
||||||
*/
|
*/
|
||||||
YY_BUFFER_STATE cmExpr_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
|
YY_BUFFER_STATE cmExpr_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
YY_BUFFER_STATE b;
|
YY_BUFFER_STATE b;
|
||||||
|
|
||||||
if ( size < 2 ||
|
if ( size < 2 ||
|
||||||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
||||||
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
||||||
|
@ -1564,7 +1564,7 @@ YY_BUFFER_STATE cmExpr_yy_scan_buffer (char * base, yy_size_t size , yyscan_t
|
||||||
*/
|
*/
|
||||||
YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner)
|
YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
|
|
||||||
return cmExpr_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner);
|
return cmExpr_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1581,7 +1581,7 @@ YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char * bytes, int len , yyscan_t
|
||||||
char *buf;
|
char *buf;
|
||||||
yy_size_t n;
|
yy_size_t n;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||||
n = len + 2;
|
n = len + 2;
|
||||||
buf = (char *) cmExpr_yyalloc(n ,yyscanner );
|
buf = (char *) cmExpr_yyalloc(n ,yyscanner );
|
||||||
|
@ -1649,10 +1649,10 @@ YY_EXTRA_TYPE cmExpr_yyget_extra (yyscan_t yyscanner)
|
||||||
int cmExpr_yyget_lineno (yyscan_t yyscanner)
|
int cmExpr_yyget_lineno (yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||||
|
|
||||||
if (! YY_CURRENT_BUFFER)
|
if (! YY_CURRENT_BUFFER)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return yylineno;
|
return yylineno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1662,10 +1662,10 @@ int cmExpr_yyget_lineno (yyscan_t yyscanner)
|
||||||
int cmExpr_yyget_column (yyscan_t yyscanner)
|
int cmExpr_yyget_column (yyscan_t yyscanner)
|
||||||
{
|
{
|
||||||
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
|
||||||
|
|
||||||
if (! YY_CURRENT_BUFFER)
|
if (! YY_CURRENT_BUFFER)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return yycolumn;
|
return yycolumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1726,8 +1726,8 @@ void cmExpr_yyset_lineno (int line_number , yyscan_t yyscanner)
|
||||||
|
|
||||||
/* lineno is only valid if an input buffer exists. */
|
/* lineno is only valid if an input buffer exists. */
|
||||||
if (! YY_CURRENT_BUFFER )
|
if (! YY_CURRENT_BUFFER )
|
||||||
yy_fatal_error( "cmExpr_yyset_lineno called with no buffer" , yyscanner);
|
yy_fatal_error( "cmExpr_yyset_lineno called with no buffer" , yyscanner);
|
||||||
|
|
||||||
yylineno = line_number;
|
yylineno = line_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1741,8 +1741,8 @@ void cmExpr_yyset_column (int column_no , yyscan_t yyscanner)
|
||||||
|
|
||||||
/* column is only valid if an input buffer exists. */
|
/* column is only valid if an input buffer exists. */
|
||||||
if (! YY_CURRENT_BUFFER )
|
if (! YY_CURRENT_BUFFER )
|
||||||
yy_fatal_error( "cmExpr_yyset_column called with no buffer" , yyscanner);
|
yy_fatal_error( "cmExpr_yyset_column called with no buffer" , yyscanner);
|
||||||
|
|
||||||
yycolumn = column_no;
|
yycolumn = column_no;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,19 +36,19 @@ public:
|
||||||
virtual const char* GetName() const
|
virtual const char* GetName() const
|
||||||
{ return cmGlobalKdevelopGenerator::GetActualName();}
|
{ return cmGlobalKdevelopGenerator::GetActualName();}
|
||||||
static const char* GetActualName() { return "KDevelop3";}
|
static const char* GetActualName() { return "KDevelop3";}
|
||||||
static cmExternalMakefileProjectGenerator* New()
|
static cmExternalMakefileProjectGenerator* New()
|
||||||
{ return new cmGlobalKdevelopGenerator; }
|
{ return new cmGlobalKdevelopGenerator; }
|
||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
virtual void GetDocumentation(cmDocumentationEntry& entry,
|
virtual void GetDocumentation(cmDocumentationEntry& entry,
|
||||||
const char* fullName) const;
|
const char* fullName) const;
|
||||||
|
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
private:
|
private:
|
||||||
/*** Create the foo.kdevelop.filelist file, return false if it doesn't
|
/*** Create the foo.kdevelop.filelist file, return false if it doesn't
|
||||||
succeed. If the file already exists the contents will be merged.
|
succeed. If the file already exists the contents will be merged.
|
||||||
*/
|
*/
|
||||||
bool CreateFilelistFile(const std::vector<cmLocalGenerator*>& lgs,
|
bool CreateFilelistFile(const std::vector<cmLocalGenerator*>& lgs,
|
||||||
const std::string& outputDir,
|
const std::string& outputDir,
|
||||||
const std::string& projectDirIn,
|
const std::string& projectDirIn,
|
||||||
const std::string& projectname,
|
const std::string& projectname,
|
||||||
std::string& cmakeFilePattern,
|
std::string& cmakeFilePattern,
|
||||||
|
@ -62,13 +62,13 @@ private:
|
||||||
listfiles used by this CMakeLists.txt */
|
listfiles used by this CMakeLists.txt */
|
||||||
void CreateProjectFile(const std::string& outputDir,
|
void CreateProjectFile(const std::string& outputDir,
|
||||||
const std::string& projectDir,
|
const std::string& projectDir,
|
||||||
const std::string& projectname,
|
const std::string& projectname,
|
||||||
const std::string& executable,
|
const std::string& executable,
|
||||||
const std::string& cmakeFilePattern,
|
const std::string& cmakeFilePattern,
|
||||||
const std::string& fileToOpen);
|
const std::string& fileToOpen);
|
||||||
|
|
||||||
/*** Reads the old foo.kdevelop line by line and only replaces the
|
/*** Reads the old foo.kdevelop line by line and only replaces the
|
||||||
"important" lines
|
"important" lines
|
||||||
*/
|
*/
|
||||||
void MergeProjectFiles(const std::string& outputDir,
|
void MergeProjectFiles(const std::string& outputDir,
|
||||||
const std::string& projectDir,
|
const std::string& projectDir,
|
||||||
|
@ -78,10 +78,10 @@ private:
|
||||||
const std::string& fileToOpen,
|
const std::string& fileToOpen,
|
||||||
const std::string& sessionFilename);
|
const std::string& sessionFilename);
|
||||||
///! Creates a new foo.kdevelop and a new foo.kdevses file
|
///! Creates a new foo.kdevelop and a new foo.kdevses file
|
||||||
void CreateNewProjectFile(const std::string& outputDir,
|
void CreateNewProjectFile(const std::string& outputDir,
|
||||||
const std::string& projectDir,
|
const std::string& projectDir,
|
||||||
const std::string& filename,
|
const std::string& filename,
|
||||||
const std::string& executable,
|
const std::string& executable,
|
||||||
const std::string& cmakeFilePattern,
|
const std::string& cmakeFilePattern,
|
||||||
const std::string& fileToOpen,
|
const std::string& fileToOpen,
|
||||||
const std::string& sessionFilename);
|
const std::string& sessionFilename);
|
||||||
|
|
|
@ -26,9 +26,9 @@ class cmGlobalVisualStudio7Generator : public cmGlobalVisualStudioGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmGlobalVisualStudio7Generator();
|
cmGlobalVisualStudio7Generator();
|
||||||
static cmGlobalGenerator* New() {
|
static cmGlobalGenerator* New() {
|
||||||
return new cmGlobalVisualStudio7Generator; }
|
return new cmGlobalVisualStudio7Generator; }
|
||||||
|
|
||||||
///! Get the name for the generator.
|
///! Get the name for the generator.
|
||||||
virtual const char* GetName() const {
|
virtual const char* GetName() const {
|
||||||
return cmGlobalVisualStudio7Generator::GetActualName();}
|
return cmGlobalVisualStudio7Generator::GetActualName();}
|
||||||
|
@ -39,12 +39,12 @@ public:
|
||||||
|
|
||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to determine system infomation such as shared library
|
* Try to determine system infomation such as shared library
|
||||||
* extension, pthreads, byte order etc.
|
* extension, pthreads, byte order etc.
|
||||||
*/
|
*/
|
||||||
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
||||||
cmMakefile *, bool optional);
|
cmMakefile *, bool optional);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,8 +52,8 @@ public:
|
||||||
* loaded commands, not as part of the usual build process.
|
* loaded commands, not as part of the usual build process.
|
||||||
*/
|
*/
|
||||||
virtual std::string GenerateBuildCommand(const char* makeProgram,
|
virtual std::string GenerateBuildCommand(const char* makeProgram,
|
||||||
const char *projectName,
|
const char *projectName,
|
||||||
const char* additionalOptions,
|
const char* additionalOptions,
|
||||||
const char *targetName,
|
const char *targetName,
|
||||||
const char* config,
|
const char* config,
|
||||||
bool ignoreErrors,
|
bool ignoreErrors,
|
||||||
|
@ -62,7 +62,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Generate the all required files for building this project/tree. This
|
* Generate the all required files for building this project/tree. This
|
||||||
* basically creates a series of LocalGenerators for each directory and
|
* basically creates a series of LocalGenerators for each directory and
|
||||||
* requests that they Generate.
|
* requests that they Generate.
|
||||||
*/
|
*/
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ public:
|
||||||
* Get the list of configurations
|
* Get the list of configurations
|
||||||
*/
|
*/
|
||||||
std::vector<std::string> *GetConfigurations();
|
std::vector<std::string> *GetConfigurations();
|
||||||
|
|
||||||
///! Create a GUID or get an existing one.
|
///! Create a GUID or get an existing one.
|
||||||
void CreateGUID(const char* name);
|
void CreateGUID(const char* name);
|
||||||
std::string GetGUID(const char* name);
|
std::string GetGUID(const char* name);
|
||||||
|
@ -97,13 +97,13 @@ protected:
|
||||||
virtual const char* GetIDEVersion() { return "7.0"; }
|
virtual const char* GetIDEVersion() { return "7.0"; }
|
||||||
|
|
||||||
static cmIDEFlagTable const* GetExtraFlagTableVS7();
|
static cmIDEFlagTable const* GetExtraFlagTableVS7();
|
||||||
virtual void OutputSLNFile(cmLocalGenerator* root,
|
virtual void OutputSLNFile(cmLocalGenerator* root,
|
||||||
std::vector<cmLocalGenerator*>& generators);
|
std::vector<cmLocalGenerator*>& generators);
|
||||||
virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root,
|
virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root,
|
||||||
std::vector<cmLocalGenerator*>& generators);
|
std::vector<cmLocalGenerator*>& generators);
|
||||||
virtual void WriteProject(std::ostream& fout,
|
virtual void WriteProject(std::ostream& fout,
|
||||||
const char* name, const char* path, cmTarget &t);
|
const char* name, const char* path, cmTarget &t);
|
||||||
virtual void WriteProjectDepends(std::ostream& fout,
|
virtual void WriteProjectDepends(std::ostream& fout,
|
||||||
const char* name, const char* path, cmTarget &t);
|
const char* name, const char* path, cmTarget &t);
|
||||||
virtual void WriteProjectConfigurations(std::ostream& fout,
|
virtual void WriteProjectConfigurations(std::ostream& fout,
|
||||||
const char* name,
|
const char* name,
|
||||||
|
@ -124,11 +124,11 @@ protected:
|
||||||
std::ostream& fout,
|
std::ostream& fout,
|
||||||
cmLocalGenerator* root,
|
cmLocalGenerator* root,
|
||||||
OrderedTargetDependSet const& projectTargets);
|
OrderedTargetDependSet const& projectTargets);
|
||||||
|
|
||||||
void GenerateConfigurations(cmMakefile* mf);
|
void GenerateConfigurations(cmMakefile* mf);
|
||||||
|
|
||||||
virtual void WriteExternalProject(std::ostream& fout,
|
virtual void WriteExternalProject(std::ostream& fout,
|
||||||
const char* name,
|
const char* name,
|
||||||
const char* path,
|
const char* path,
|
||||||
const std::set<cmStdString>&
|
const std::set<cmStdString>&
|
||||||
dependencies);
|
dependencies);
|
||||||
|
|
|
@ -33,19 +33,19 @@ class cmLocalGenerator
|
||||||
public:
|
public:
|
||||||
cmLocalGenerator();
|
cmLocalGenerator();
|
||||||
virtual ~cmLocalGenerator();
|
virtual ~cmLocalGenerator();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the makefile for this directory.
|
* Generate the makefile for this directory.
|
||||||
*/
|
*/
|
||||||
virtual void Generate() {}
|
virtual void Generate() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process the CMakeLists files for this directory to fill in the
|
* Process the CMakeLists files for this directory to fill in the
|
||||||
* Makefile ivar
|
* Makefile ivar
|
||||||
*/
|
*/
|
||||||
virtual void Configure();
|
virtual void Configure();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calls TraceVSDependencies() on all targets of this generator.
|
* Calls TraceVSDependencies() on all targets of this generator.
|
||||||
*/
|
*/
|
||||||
virtual void TraceDependencies();
|
virtual void TraceDependencies();
|
||||||
|
@ -75,11 +75,11 @@ public:
|
||||||
///! Get the makefile for this generator
|
///! Get the makefile for this generator
|
||||||
cmMakefile *GetMakefile() {
|
cmMakefile *GetMakefile() {
|
||||||
return this->Makefile; };
|
return this->Makefile; };
|
||||||
|
|
||||||
///! Get the makefile for this generator, const version
|
///! Get the makefile for this generator, const version
|
||||||
const cmMakefile *GetMakefile() const {
|
const cmMakefile *GetMakefile() const {
|
||||||
return this->Makefile; };
|
return this->Makefile; };
|
||||||
|
|
||||||
///! Get the GlobalGenerator this is associated with
|
///! Get the GlobalGenerator this is associated with
|
||||||
cmGlobalGenerator *GetGlobalGenerator() {
|
cmGlobalGenerator *GetGlobalGenerator() {
|
||||||
return this->GlobalGenerator; };
|
return this->GlobalGenerator; };
|
||||||
|
@ -89,10 +89,10 @@ public:
|
||||||
///! Set the Global Generator, done on creation by the GlobalGenerator
|
///! Set the Global Generator, done on creation by the GlobalGenerator
|
||||||
void SetGlobalGenerator(cmGlobalGenerator *gg);
|
void SetGlobalGenerator(cmGlobalGenerator *gg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert something to something else. This is a centralized coversion
|
* Convert something to something else. This is a centralized coversion
|
||||||
* routine used by the generators to handle relative paths and the like.
|
* routine used by the generators to handle relative paths and the like.
|
||||||
* The flags determine what is actually done.
|
* The flags determine what is actually done.
|
||||||
*
|
*
|
||||||
* relative: treat the argument as a directory and convert it to make it
|
* relative: treat the argument as a directory and convert it to make it
|
||||||
* relative or full or unchanged. If relative (HOME, START etc) then that
|
* relative or full or unchanged. If relative (HOME, START etc) then that
|
||||||
|
@ -117,7 +117,7 @@ public:
|
||||||
* Get path for the specified relative root.
|
* Get path for the specified relative root.
|
||||||
*/
|
*/
|
||||||
const char* GetRelativeRootPath(RelativeRoot relroot);
|
const char* GetRelativeRootPath(RelativeRoot relroot);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert the given path to an output path that is optionally
|
* Convert the given path to an output path that is optionally
|
||||||
* relative based on the cache option CMAKE_USE_RELATIVE_PATHS. The
|
* relative based on the cache option CMAKE_USE_RELATIVE_PATHS. The
|
||||||
|
@ -126,14 +126,14 @@ public:
|
||||||
*/
|
*/
|
||||||
std::string ConvertToOptionallyRelativeOutputPath(const char* remote);
|
std::string ConvertToOptionallyRelativeOutputPath(const char* remote);
|
||||||
|
|
||||||
///! set/get the parent generator
|
///! set/get the parent generator
|
||||||
cmLocalGenerator* GetParent(){return this->Parent;}
|
cmLocalGenerator* GetParent(){return this->Parent;}
|
||||||
void SetParent(cmLocalGenerator* g) { this->Parent = g; g->AddChild(this); }
|
void SetParent(cmLocalGenerator* g) { this->Parent = g; g->AddChild(this); }
|
||||||
|
|
||||||
///! set/get the children
|
///! set/get the children
|
||||||
void AddChild(cmLocalGenerator* g) { this->Children.push_back(g); }
|
void AddChild(cmLocalGenerator* g) { this->Children.push_back(g); }
|
||||||
std::vector<cmLocalGenerator*>& GetChildren() { return this->Children; };
|
std::vector<cmLocalGenerator*>& GetChildren() { return this->Children; };
|
||||||
|
|
||||||
|
|
||||||
void AddArchitectureFlags(std::string& flags, cmTarget* target,
|
void AddArchitectureFlags(std::string& flags, cmTarget* target,
|
||||||
const char *lang, const char* config);
|
const char *lang, const char* config);
|
||||||
|
@ -183,9 +183,9 @@ public:
|
||||||
virtual std::string ConvertToIncludeReference(std::string const& path);
|
virtual std::string ConvertToIncludeReference(std::string const& path);
|
||||||
|
|
||||||
/** Called from command-line hook to clear dependencies. */
|
/** Called from command-line hook to clear dependencies. */
|
||||||
virtual void ClearDependencies(cmMakefile* /* mf */,
|
virtual void ClearDependencies(cmMakefile* /* mf */,
|
||||||
bool /* verbose */) {}
|
bool /* verbose */) {}
|
||||||
|
|
||||||
/** Called from command-line hook to update dependencies. */
|
/** Called from command-line hook to update dependencies. */
|
||||||
virtual bool UpdateDependencies(const char* /* tgtInfo */,
|
virtual bool UpdateDependencies(const char* /* tgtInfo */,
|
||||||
bool /*verbose*/,
|
bool /*verbose*/,
|
||||||
|
@ -259,11 +259,11 @@ public:
|
||||||
/** Return the directories into which object files will be put.
|
/** Return the directories into which object files will be put.
|
||||||
* There maybe more than one for fat binary systems like OSX.
|
* There maybe more than one for fat binary systems like OSX.
|
||||||
*/
|
*/
|
||||||
virtual void
|
virtual void
|
||||||
GetTargetObjectFileDirectories(cmTarget* target,
|
GetTargetObjectFileDirectories(cmTarget* target,
|
||||||
std::vector<std::string>&
|
std::vector<std::string>&
|
||||||
dirs);
|
dirs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert the given remote path to a relative path with respect to
|
* Convert the given remote path to a relative path with respect to
|
||||||
* the given local path. The local path must be given in component
|
* the given local path. The local path must be given in component
|
||||||
|
@ -321,15 +321,15 @@ public:
|
||||||
|
|
||||||
/** Fill out these strings for the given target. Libraries to link,
|
/** Fill out these strings for the given target. Libraries to link,
|
||||||
* flags, and linkflags. */
|
* flags, and linkflags. */
|
||||||
void GetTargetFlags(std::string& linkLibs,
|
void GetTargetFlags(std::string& linkLibs,
|
||||||
std::string& flags,
|
std::string& flags,
|
||||||
std::string& linkFlags,
|
std::string& linkFlags,
|
||||||
cmTarget&target);
|
cmTarget&target);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
///! put all the libraries for a target on into the given stream
|
///! put all the libraries for a target on into the given stream
|
||||||
virtual void OutputLinkLibraries(std::ostream&, cmTarget&, bool relink);
|
virtual void OutputLinkLibraries(std::ostream&, cmTarget&, bool relink);
|
||||||
|
|
||||||
// Expand rule variables in CMake of the type found in language rules
|
// Expand rule variables in CMake of the type found in language rules
|
||||||
void ExpandRuleVariables(std::string& string,
|
void ExpandRuleVariables(std::string& string,
|
||||||
const RuleVariables& replaceValues);
|
const RuleVariables& replaceValues);
|
||||||
|
@ -341,13 +341,13 @@ protected:
|
||||||
void InsertRuleLauncher(std::string& s, cmTarget* target,
|
void InsertRuleLauncher(std::string& s, cmTarget* target,
|
||||||
const char* prop);
|
const char* prop);
|
||||||
|
|
||||||
|
|
||||||
/** Convert a target to a utility target for unsupported
|
/** Convert a target to a utility target for unsupported
|
||||||
* languages of a generator */
|
* languages of a generator */
|
||||||
void AddBuildTargetRule(const char* llang, cmTarget& target);
|
void AddBuildTargetRule(const char* llang, cmTarget& target);
|
||||||
///! add a custom command to build a .o file that is part of a target
|
///! add a custom command to build a .o file that is part of a target
|
||||||
void AddCustomCommandToCreateObject(const char* ofname,
|
void AddCustomCommandToCreateObject(const char* ofname,
|
||||||
const char* lang,
|
const char* lang,
|
||||||
cmSourceFile& source,
|
cmSourceFile& source,
|
||||||
cmTarget& target);
|
cmTarget& target);
|
||||||
// Create Custom Targets and commands for unsupported languages
|
// Create Custom Targets and commands for unsupported languages
|
||||||
|
|
|
@ -38,21 +38,21 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process the CMakeLists files for this directory to fill in the
|
* Process the CMakeLists files for this directory to fill in the
|
||||||
* Makefile ivar
|
* Makefile ivar
|
||||||
*/
|
*/
|
||||||
virtual void Configure();
|
virtual void Configure();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate the makefile for this directory.
|
* Generate the makefile for this directory.
|
||||||
*/
|
*/
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
|
|
||||||
|
|
||||||
// this returns the relative path between the HomeOutputDirectory and this
|
// this returns the relative path between the HomeOutputDirectory and this
|
||||||
// local generators StartOutputDirectory
|
// local generators StartOutputDirectory
|
||||||
const std::string &GetHomeRelativeOutputPath();
|
const std::string &GetHomeRelativeOutputPath();
|
||||||
|
|
||||||
// Write out a make rule
|
// Write out a make rule
|
||||||
void WriteMakeRule(std::ostream& os,
|
void WriteMakeRule(std::ostream& os,
|
||||||
const char* comment,
|
const char* comment,
|
||||||
const char* target,
|
const char* target,
|
||||||
|
@ -60,7 +60,7 @@ public:
|
||||||
const std::vector<std::string>& commands,
|
const std::vector<std::string>& commands,
|
||||||
bool symbolic,
|
bool symbolic,
|
||||||
bool in_help = false);
|
bool in_help = false);
|
||||||
|
|
||||||
// write the main variables used by the makefiles
|
// write the main variables used by the makefiles
|
||||||
void WriteMakeVariables(std::ostream& makefileStream);
|
void WriteMakeVariables(std::ostream& makefileStream);
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ public:
|
||||||
*/
|
*/
|
||||||
void SetPassMakeflags(bool s){this->PassMakeflags = s;}
|
void SetPassMakeflags(bool s){this->PassMakeflags = s;}
|
||||||
bool GetPassMakeflags() { return this->PassMakeflags; }
|
bool GetPassMakeflags() { return this->PassMakeflags; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the flag used to keep the make program silent.
|
* Set the flag used to keep the make program silent.
|
||||||
*/
|
*/
|
||||||
|
@ -115,7 +115,7 @@ public:
|
||||||
void SetDefineWindowsNULL(bool v) {this->DefineWindowsNULL = v;}
|
void SetDefineWindowsNULL(bool v) {this->DefineWindowsNULL = v;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If set to true, cd dir && command is used to
|
* If set to true, cd dir && command is used to
|
||||||
* run commands in a different directory.
|
* run commands in a different directory.
|
||||||
*/
|
*/
|
||||||
void SetUnixCD(bool v) {this->UnixCD = v;}
|
void SetUnixCD(bool v) {this->UnixCD = v;}
|
||||||
|
@ -168,8 +168,8 @@ public:
|
||||||
void WriteDivider(std::ostream& os);
|
void WriteDivider(std::ostream& os);
|
||||||
|
|
||||||
/** used to create a recursive make call */
|
/** used to create a recursive make call */
|
||||||
std::string GetRecursiveMakeCall(const char *makefile, const char* tgt);
|
std::string GetRecursiveMakeCall(const char *makefile, const char* tgt);
|
||||||
|
|
||||||
// append flags to a string
|
// append flags to a string
|
||||||
virtual void AppendFlags(std::string& flags, const char* newFlags);
|
virtual void AppendFlags(std::string& flags, const char* newFlags);
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ public:
|
||||||
virtual std::string GetTargetDirectory(cmTarget const& target) const;
|
virtual std::string GetTargetDirectory(cmTarget const& target) const;
|
||||||
|
|
||||||
// create a command that cds to the start dir then runs the commands
|
// create a command that cds to the start dir then runs the commands
|
||||||
void CreateCDCommand(std::vector<std::string>& commands,
|
void CreateCDCommand(std::vector<std::string>& commands,
|
||||||
const char *targetDir,
|
const char *targetDir,
|
||||||
cmLocalGenerator::RelativeRoot returnDir);
|
cmLocalGenerator::RelativeRoot returnDir);
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ public:
|
||||||
|
|
||||||
/** Called from command-line hook to clear dependencies. */
|
/** Called from command-line hook to clear dependencies. */
|
||||||
virtual void ClearDependencies(cmMakefile* mf, bool verbose);
|
virtual void ClearDependencies(cmMakefile* mf, bool verbose);
|
||||||
|
|
||||||
/** write some extra rules such as make test etc */
|
/** write some extra rules such as make test etc */
|
||||||
void WriteSpecialTargetsTop(std::ostream& makefileStream);
|
void WriteSpecialTargetsTop(std::ostream& makefileStream);
|
||||||
void WriteSpecialTargetsBottom(std::ostream& makefileStream);
|
void WriteSpecialTargetsBottom(std::ostream& makefileStream);
|
||||||
|
@ -224,7 +224,7 @@ public:
|
||||||
|
|
||||||
// write the target rules for the local Makefile into the stream
|
// write the target rules for the local Makefile into the stream
|
||||||
void WriteLocalAllRules(std::ostream& ruleFileStream);
|
void WriteLocalAllRules(std::ostream& ruleFileStream);
|
||||||
|
|
||||||
struct LocalObjectEntry
|
struct LocalObjectEntry
|
||||||
{
|
{
|
||||||
cmTarget* Target;
|
cmTarget* Target;
|
||||||
|
@ -238,7 +238,7 @@ public:
|
||||||
bool HasSourceExtension;
|
bool HasSourceExtension;
|
||||||
bool HasPreprocessRule;
|
bool HasPreprocessRule;
|
||||||
bool HasAssembleRule;
|
bool HasAssembleRule;
|
||||||
LocalObjectInfo():HasSourceExtension(false), HasPreprocessRule(false),
|
LocalObjectInfo():HasSourceExtension(false), HasPreprocessRule(false),
|
||||||
HasAssembleRule(false) {}
|
HasAssembleRule(false) {}
|
||||||
};
|
};
|
||||||
std::map<cmStdString, LocalObjectInfo> const& GetLocalObjectFiles()
|
std::map<cmStdString, LocalObjectInfo> const& GetLocalObjectFiles()
|
||||||
|
@ -261,15 +261,15 @@ public:
|
||||||
void GetTargetObjectFileDirectories(cmTarget* target,
|
void GetTargetObjectFileDirectories(cmTarget* target,
|
||||||
std::vector<std::string>& dirs);
|
std::vector<std::string>& dirs);
|
||||||
|
|
||||||
// Fill the vector with the target names for the object files,
|
// Fill the vector with the target names for the object files,
|
||||||
// preprocessed files and assembly files. Currently only used by the
|
// preprocessed files and assembly files. Currently only used by the
|
||||||
// Eclipse generator.
|
// Eclipse generator.
|
||||||
void GetIndividualFileTargets(std::vector<std::string>& targets);
|
void GetIndividualFileTargets(std::vector<std::string>& targets);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void WriteLocalMakefile();
|
void WriteLocalMakefile();
|
||||||
|
|
||||||
|
|
||||||
// write the target rules for the local Makefile into the stream
|
// write the target rules for the local Makefile into the stream
|
||||||
void WriteLocalMakefileTargets(std::ostream& ruleFileStream,
|
void WriteLocalMakefileTargets(std::ostream& ruleFileStream,
|
||||||
std::set<cmStdString> &emitted);
|
std::set<cmStdString> &emitted);
|
||||||
|
@ -278,17 +278,17 @@ protected:
|
||||||
void WriteDirectoryInformationFile();
|
void WriteDirectoryInformationFile();
|
||||||
|
|
||||||
|
|
||||||
// write the depend info
|
// write the depend info
|
||||||
void WriteDependLanguageInfo(std::ostream& cmakefileStream, cmTarget &tgt);
|
void WriteDependLanguageInfo(std::ostream& cmakefileStream, cmTarget &tgt);
|
||||||
|
|
||||||
// write the local help rule
|
// write the local help rule
|
||||||
void WriteHelpRule(std::ostream& ruleFileStream);
|
void WriteHelpRule(std::ostream& ruleFileStream);
|
||||||
|
|
||||||
// this converts a file name that is relative to the StartOuputDirectory
|
// this converts a file name that is relative to the StartOuputDirectory
|
||||||
// into a full path
|
// into a full path
|
||||||
std::string ConvertToFullPath(const std::string& localPath);
|
std::string ConvertToFullPath(const std::string& localPath);
|
||||||
|
|
||||||
|
|
||||||
void WriteConvenienceRule(std::ostream& ruleFileStream,
|
void WriteConvenienceRule(std::ostream& ruleFileStream,
|
||||||
const char* realTarget,
|
const char* realTarget,
|
||||||
const char* helpTarget);
|
const char* helpTarget);
|
||||||
|
@ -304,7 +304,7 @@ protected:
|
||||||
void WriteObjectConvenienceRule(std::ostream& ruleFileStream,
|
void WriteObjectConvenienceRule(std::ostream& ruleFileStream,
|
||||||
const char* comment, const char* output,
|
const char* comment, const char* output,
|
||||||
LocalObjectInfo const& info);
|
LocalObjectInfo const& info);
|
||||||
|
|
||||||
std::string GetObjectFileName(cmTarget& target,
|
std::string GetObjectFileName(cmTarget& target,
|
||||||
const cmSourceFile& source,
|
const cmSourceFile& source,
|
||||||
std::string* nameWithoutTargetDir = 0,
|
std::string* nameWithoutTargetDir = 0,
|
||||||
|
|
|
@ -72,7 +72,7 @@ public:
|
||||||
/** Return whether compatibility features needed for a version of
|
/** Return whether compatibility features needed for a version of
|
||||||
the cache or lower should be enabled. */
|
the cache or lower should be enabled. */
|
||||||
bool NeedCacheCompatibility(int major, int minor);
|
bool NeedCacheCompatibility(int major, int minor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct an empty makefile.
|
* Construct an empty makefile.
|
||||||
*/
|
*/
|
||||||
|
@ -87,8 +87,8 @@ public:
|
||||||
/**
|
/**
|
||||||
* Read and parse a CMakeLists.txt file.
|
* Read and parse a CMakeLists.txt file.
|
||||||
*/
|
*/
|
||||||
bool ReadListFile(const char* listfile,
|
bool ReadListFile(const char* listfile,
|
||||||
const char* external= 0,
|
const char* external= 0,
|
||||||
std::string* fullPath= 0,
|
std::string* fullPath= 0,
|
||||||
bool noPolicyScope = true);
|
bool noPolicyScope = true);
|
||||||
|
|
||||||
|
@ -121,21 +121,21 @@ public:
|
||||||
* Try running cmake and building a file. This is used for dynalically
|
* Try running cmake and building a file. This is used for dynalically
|
||||||
* loaded commands, not as part of the usual build process.
|
* loaded commands, not as part of the usual build process.
|
||||||
*/
|
*/
|
||||||
int TryCompile(const char *srcdir, const char *bindir,
|
int TryCompile(const char *srcdir, const char *bindir,
|
||||||
const char *projectName, const char *targetName,
|
const char *projectName, const char *targetName,
|
||||||
bool fast,
|
bool fast,
|
||||||
const std::vector<std::string> *cmakeArgs,
|
const std::vector<std::string> *cmakeArgs,
|
||||||
std::string *output);
|
std::string *output);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the makefile generator. This is platform/compiler
|
* Specify the makefile generator. This is platform/compiler
|
||||||
* dependent, although the interface is through a generic
|
* dependent, although the interface is through a generic
|
||||||
* superclass.
|
* superclass.
|
||||||
*/
|
*/
|
||||||
void SetLocalGenerator(cmLocalGenerator*);
|
void SetLocalGenerator(cmLocalGenerator*);
|
||||||
|
|
||||||
///! Get the current makefile generator.
|
///! Get the current makefile generator.
|
||||||
cmLocalGenerator* GetLocalGenerator()
|
cmLocalGenerator* GetLocalGenerator()
|
||||||
{ return this->LocalGenerator;}
|
{ return this->LocalGenerator;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -153,15 +153,15 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform FinalPass, Library dependency analysis etc before output of the
|
* Perform FinalPass, Library dependency analysis etc before output of the
|
||||||
* makefile.
|
* makefile.
|
||||||
*/
|
*/
|
||||||
void ConfigureFinalPass();
|
void ConfigureFinalPass();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* run the final pass on all commands.
|
* run the final pass on all commands.
|
||||||
*/
|
*/
|
||||||
void FinalPass();
|
void FinalPass();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print the object state to std::cout.
|
* Print the object state to std::cout.
|
||||||
*/
|
*/
|
||||||
|
@ -205,11 +205,11 @@ public:
|
||||||
cmTarget* AddImportedTarget(const char* name, cmTarget::TargetType type);
|
cmTarget* AddImportedTarget(const char* name, cmTarget::TargetType type);
|
||||||
|
|
||||||
cmTarget* AddNewTarget(cmTarget::TargetType type, const char* name);
|
cmTarget* AddNewTarget(cmTarget::TargetType type, const char* name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an executable to the build.
|
* Add an executable to the build.
|
||||||
*/
|
*/
|
||||||
cmTarget* AddExecutable(const char *exename,
|
cmTarget* AddExecutable(const char *exename,
|
||||||
const std::vector<std::string> &srcs,
|
const std::vector<std::string> &srcs,
|
||||||
bool excludeFromAll = false);
|
bool excludeFromAll = false);
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ public:
|
||||||
*/
|
*/
|
||||||
void AddLinkLibrary(const char*);
|
void AddLinkLibrary(const char*);
|
||||||
void AddLinkLibrary(const char*, cmTarget::LinkLibraryType type);
|
void AddLinkLibrary(const char*, cmTarget::LinkLibraryType type);
|
||||||
void AddLinkLibraryForTarget(const char *tgt, const char*,
|
void AddLinkLibraryForTarget(const char *tgt, const char*,
|
||||||
cmTarget::LinkLibraryType type);
|
cmTarget::LinkLibraryType type);
|
||||||
void AddLinkDirectoryForTarget(const char *tgt, const char* d);
|
void AddLinkDirectoryForTarget(const char *tgt, const char* d);
|
||||||
|
|
||||||
|
@ -265,9 +265,9 @@ public:
|
||||||
/**
|
/**
|
||||||
* Add a subdirectory to the build.
|
* Add a subdirectory to the build.
|
||||||
*/
|
*/
|
||||||
void AddSubDirectory(const char*, bool excludeFromAll=false,
|
void AddSubDirectory(const char*, bool excludeFromAll=false,
|
||||||
bool preorder = false);
|
bool preorder = false);
|
||||||
void AddSubDirectory(const char* fullSrcDir,const char *fullBinDir,
|
void AddSubDirectory(const char* fullSrcDir,const char *fullBinDir,
|
||||||
bool excludeFromAll, bool preorder,
|
bool excludeFromAll, bool preorder,
|
||||||
bool immediate);
|
bool immediate);
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ public:
|
||||||
* Configure a subdirectory
|
* Configure a subdirectory
|
||||||
*/
|
*/
|
||||||
void ConfigureSubDirectory(cmLocalGenerator *);
|
void ConfigureSubDirectory(cmLocalGenerator *);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an include directory to the build.
|
* Add an include directory to the build.
|
||||||
*/
|
*/
|
||||||
|
@ -287,13 +287,13 @@ public:
|
||||||
*/
|
*/
|
||||||
void AddDefinition(const char* name, const char* value);
|
void AddDefinition(const char* name, const char* value);
|
||||||
///! Add a definition to this makefile and the global cmake cache.
|
///! Add a definition to this makefile and the global cmake cache.
|
||||||
void AddCacheDefinition(const char* name, const char* value,
|
void AddCacheDefinition(const char* name, const char* value,
|
||||||
const char* doc,
|
const char* doc,
|
||||||
cmCacheManager::CacheEntryType type,
|
cmCacheManager::CacheEntryType type,
|
||||||
bool force = false);
|
bool force = false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add bool variable definition to the build.
|
* Add bool variable definition to the build.
|
||||||
*/
|
*/
|
||||||
void AddDefinition(const char* name, bool);
|
void AddDefinition(const char* name, bool);
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ public:
|
||||||
void RemoveDefinition(const char* name);
|
void RemoveDefinition(const char* name);
|
||||||
///! Remove a definition from the cache.
|
///! Remove a definition from the cache.
|
||||||
void RemoveCacheDefinition(const char* name);
|
void RemoveCacheDefinition(const char* name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the name of the project for this build.
|
* Specify the name of the project for this build.
|
||||||
*/
|
*/
|
||||||
|
@ -339,14 +339,14 @@ public:
|
||||||
* Add a source group for consideration when adding a new source.
|
* Add a source group for consideration when adding a new source.
|
||||||
* name is tokenized.
|
* name is tokenized.
|
||||||
*/
|
*/
|
||||||
void AddSourceGroup(const std::vector<std::string>& name,
|
void AddSourceGroup(const std::vector<std::string>& name,
|
||||||
const char* regex=0);
|
const char* regex=0);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//@{
|
//@{
|
||||||
/**
|
/**
|
||||||
* Set, Push, Pop policy values for CMake.
|
* Set, Push, Pop policy values for CMake.
|
||||||
*/
|
*/
|
||||||
bool SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status);
|
bool SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status);
|
||||||
bool SetPolicy(const char *id, cmPolicies::PolicyStatus status);
|
bool SetPolicy(const char *id, cmPolicies::PolicyStatus status);
|
||||||
|
@ -374,31 +374,31 @@ public:
|
||||||
* Get the Policies Instance
|
* Get the Policies Instance
|
||||||
*/
|
*/
|
||||||
cmPolicies *GetPolicies();
|
cmPolicies *GetPolicies();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an auxiliary directory to the build.
|
* Add an auxiliary directory to the build.
|
||||||
*/
|
*/
|
||||||
void AddExtraDirectory(const char* dir);
|
void AddExtraDirectory(const char* dir);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an auxiliary directory to the build.
|
* Add an auxiliary directory to the build.
|
||||||
*/
|
*/
|
||||||
void MakeStartDirectoriesCurrent()
|
void MakeStartDirectoriesCurrent()
|
||||||
{
|
{
|
||||||
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
|
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
|
||||||
this->cmStartDirectory.c_str());
|
this->cmStartDirectory.c_str());
|
||||||
this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
|
this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
|
||||||
this->StartOutputDirectory.c_str());
|
this->StartOutputDirectory.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
//@{
|
//@{
|
||||||
/**
|
/**
|
||||||
* Set/Get the home directory (or output directory) in the project. The
|
* Set/Get the home directory (or output directory) in the project. The
|
||||||
* home directory is the top directory of the project. It is where
|
* home directory is the top directory of the project. It is where
|
||||||
* CMakeSetup or configure was run. Remember that CMake processes
|
* CMakeSetup or configure was run. Remember that CMake processes
|
||||||
* CMakeLists files by recursing up the tree starting at the StartDirectory
|
* CMakeLists files by recursing up the tree starting at the StartDirectory
|
||||||
* and going up until it reaches the HomeDirectory.
|
* and going up until it reaches the HomeDirectory.
|
||||||
*/
|
*/
|
||||||
void SetHomeDirectory(const char* dir);
|
void SetHomeDirectory(const char* dir);
|
||||||
const char* GetHomeDirectory() const
|
const char* GetHomeDirectory() const
|
||||||
|
@ -428,15 +428,15 @@ public:
|
||||||
* is the directory of the CMakeLists.txt file that started the current
|
* is the directory of the CMakeLists.txt file that started the current
|
||||||
* round of processing. Remember that CMake processes CMakeLists files by
|
* round of processing. Remember that CMake processes CMakeLists files by
|
||||||
* recursing up the tree starting at the StartDirectory and going up until
|
* recursing up the tree starting at the StartDirectory and going up until
|
||||||
* it reaches the HomeDirectory.
|
* it reaches the HomeDirectory.
|
||||||
*/
|
*/
|
||||||
void SetStartDirectory(const char* dir)
|
void SetStartDirectory(const char* dir)
|
||||||
{
|
{
|
||||||
this->cmStartDirectory = dir;
|
this->cmStartDirectory = dir;
|
||||||
cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory);
|
cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory);
|
||||||
this->cmStartDirectory =
|
this->cmStartDirectory =
|
||||||
cmSystemTools::CollapseFullPath(this->cmStartDirectory.c_str());
|
cmSystemTools::CollapseFullPath(this->cmStartDirectory.c_str());
|
||||||
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
|
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
|
||||||
this->cmStartDirectory.c_str());
|
this->cmStartDirectory.c_str());
|
||||||
}
|
}
|
||||||
const char* GetStartDirectory() const
|
const char* GetStartDirectory() const
|
||||||
|
@ -447,10 +447,10 @@ public:
|
||||||
{
|
{
|
||||||
this->StartOutputDirectory = lib;
|
this->StartOutputDirectory = lib;
|
||||||
cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory);
|
cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory);
|
||||||
this->StartOutputDirectory =
|
this->StartOutputDirectory =
|
||||||
cmSystemTools::CollapseFullPath(this->StartOutputDirectory.c_str());
|
cmSystemTools::CollapseFullPath(this->StartOutputDirectory.c_str());
|
||||||
cmSystemTools::MakeDirectory(this->StartOutputDirectory.c_str());
|
cmSystemTools::MakeDirectory(this->StartOutputDirectory.c_str());
|
||||||
this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
|
this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
|
||||||
this->StartOutputDirectory.c_str());
|
this->StartOutputDirectory.c_str());
|
||||||
}
|
}
|
||||||
const char* GetStartOutputDirectory() const
|
const char* GetStartOutputDirectory() const
|
||||||
|
@ -459,7 +459,7 @@ public:
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
const char* GetCurrentDirectory() const
|
const char* GetCurrentDirectory() const
|
||||||
{
|
{
|
||||||
return this->cmStartDirectory.c_str();
|
return this->cmStartDirectory.c_str();
|
||||||
}
|
}
|
||||||
|
@ -478,7 +478,7 @@ public:
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a regular expression that include files must match
|
* Set a regular expression that include files must match
|
||||||
* in order to be considered as part of the depend information.
|
* in order to be considered as part of the depend information.
|
||||||
*/
|
*/
|
||||||
|
@ -487,11 +487,11 @@ public:
|
||||||
this->IncludeFileRegularExpression = regex;
|
this->IncludeFileRegularExpression = regex;
|
||||||
}
|
}
|
||||||
const char* GetIncludeRegularExpression()
|
const char* GetIncludeRegularExpression()
|
||||||
{
|
{
|
||||||
return this->IncludeFileRegularExpression.c_str();
|
return this->IncludeFileRegularExpression.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a regular expression that include files that are not found
|
* Set a regular expression that include files that are not found
|
||||||
* must match in order to be considered a problem.
|
* must match in order to be considered a problem.
|
||||||
*/
|
*/
|
||||||
|
@ -523,11 +523,11 @@ public:
|
||||||
* Get a list of include directories in the build.
|
* Get a list of include directories in the build.
|
||||||
*/
|
*/
|
||||||
std::vector<std::string>& GetIncludeDirectories()
|
std::vector<std::string>& GetIncludeDirectories()
|
||||||
{
|
{
|
||||||
return this->IncludeDirectories;
|
return this->IncludeDirectories;
|
||||||
}
|
}
|
||||||
const std::vector<std::string>& GetIncludeDirectories() const
|
const std::vector<std::string>& GetIncludeDirectories() const
|
||||||
{
|
{
|
||||||
return this->IncludeDirectories;
|
return this->IncludeDirectories;
|
||||||
}
|
}
|
||||||
void SetIncludeDirectories(const std::vector<std::string>& vec)
|
void SetIncludeDirectories(const std::vector<std::string>& vec)
|
||||||
|
@ -542,7 +542,7 @@ public:
|
||||||
bool IsSystemIncludeDirectory(const char* dir);
|
bool IsSystemIncludeDirectory(const char* dir);
|
||||||
|
|
||||||
/** Expand out any arguements in the vector that have ; separated
|
/** Expand out any arguements in the vector that have ; separated
|
||||||
* strings into multiple arguements. A new vector is created
|
* strings into multiple arguements. A new vector is created
|
||||||
* containing the expanded versions of all arguments in argsIn.
|
* containing the expanded versions of all arguments in argsIn.
|
||||||
* This method differes from the one in cmSystemTools in that if
|
* This method differes from the one in cmSystemTools in that if
|
||||||
* the CmakeLists file is version 1.2 or earlier it will check for
|
* the CmakeLists file is version 1.2 or earlier it will check for
|
||||||
|
@ -558,7 +558,7 @@ public:
|
||||||
cmSourceFile* GetSource(const char* sourceName);
|
cmSourceFile* GetSource(const char* sourceName);
|
||||||
|
|
||||||
/** Get a cmSourceFile pointer for a given source name, if the name is
|
/** Get a cmSourceFile pointer for a given source name, if the name is
|
||||||
* not found, then create the source file and return it. generated
|
* not found, then create the source file and return it. generated
|
||||||
* indicates if it is a generated file, this is used in determining
|
* indicates if it is a generated file, this is used in determining
|
||||||
* how to create the source file instance e.g. name
|
* how to create the source file instance e.g. name
|
||||||
*/
|
*/
|
||||||
|
@ -597,8 +597,8 @@ public:
|
||||||
* variables will be listed.
|
* variables will be listed.
|
||||||
*/
|
*/
|
||||||
std::vector<std::string> GetDefinitions(int cacheonly=0) const;
|
std::vector<std::string> GetDefinitions(int cacheonly=0) const;
|
||||||
|
|
||||||
/** Test a boolean cache entry to see if it is true or false,
|
/** Test a boolean cache entry to see if it is true or false,
|
||||||
* returns false if no entry defined.
|
* returns false if no entry defined.
|
||||||
*/
|
*/
|
||||||
bool IsOn(const char* name) const;
|
bool IsOn(const char* name) const;
|
||||||
|
@ -617,13 +617,13 @@ public:
|
||||||
* Make sure CMake can write this file
|
* Make sure CMake can write this file
|
||||||
*/
|
*/
|
||||||
bool CanIWriteThisFile(const char* fileName);
|
bool CanIWriteThisFile(const char* fileName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the vector of used command instances.
|
* Get the vector of used command instances.
|
||||||
*/
|
*/
|
||||||
const std::vector<cmCommand*>& GetUsedCommands() const
|
const std::vector<cmCommand*>& GetUsedCommands() const
|
||||||
{return this->UsedCommands;}
|
{return this->UsedCommands;}
|
||||||
|
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
/**
|
/**
|
||||||
* Get the vector source groups.
|
* Get the vector source groups.
|
||||||
|
@ -663,9 +663,9 @@ public:
|
||||||
{ return this->OutputFiles; }
|
{ return this->OutputFiles; }
|
||||||
void AddCMakeOutputFile(const char* file)
|
void AddCMakeOutputFile(const char* file)
|
||||||
{ this->OutputFiles.push_back(file);}
|
{ this->OutputFiles.push_back(file);}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expand all defined variables in the string.
|
* Expand all defined variables in the string.
|
||||||
* Defined variables come from the this->Definitions map.
|
* Defined variables come from the this->Definitions map.
|
||||||
* They are expanded with ${var} where var is the
|
* They are expanded with ${var} where var is the
|
||||||
* entry in the this->Definitions map. Also @var@ is
|
* entry in the this->Definitions map. Also @var@ is
|
||||||
|
@ -682,15 +682,15 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove any remaining variables in the string. Anything with ${var} or
|
* Remove any remaining variables in the string. Anything with ${var} or
|
||||||
* @var@ will be removed.
|
* @var@ will be removed.
|
||||||
*/
|
*/
|
||||||
void RemoveVariablesInString(std::string& source,
|
void RemoveVariablesInString(std::string& source,
|
||||||
bool atOnly = false) const;
|
bool atOnly = false) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expand variables in the makefiles ivars such as link directories etc
|
* Expand variables in the makefiles ivars such as link directories etc
|
||||||
*/
|
*/
|
||||||
void ExpandVariables();
|
void ExpandVariables();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace variables and #cmakedefine lines in the given string.
|
* Replace variables and #cmakedefine lines in the given string.
|
||||||
|
@ -702,7 +702,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Copy file but change lines acording to ConfigureString
|
* Copy file but change lines acording to ConfigureString
|
||||||
*/
|
*/
|
||||||
int ConfigureFile(const char* infile, const char* outfile,
|
int ConfigureFile(const char* infile, const char* outfile,
|
||||||
bool copyonly, bool atOnly, bool escapeQuotes);
|
bool copyonly, bool atOnly, bool escapeQuotes);
|
||||||
|
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
|
@ -717,12 +717,12 @@ public:
|
||||||
* Execute a single CMake command. Returns true if the command
|
* Execute a single CMake command. Returns true if the command
|
||||||
* succeeded or false if it failed.
|
* succeeded or false if it failed.
|
||||||
*/
|
*/
|
||||||
bool ExecuteCommand(const cmListFileFunction& lff,
|
bool ExecuteCommand(const cmListFileFunction& lff,
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
|
|
||||||
/** Check if a command exists. */
|
/** Check if a command exists. */
|
||||||
bool CommandExists(const char* name) const;
|
bool CommandExists(const char* name) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a command to this cmake instance
|
* Add a command to this cmake instance
|
||||||
*/
|
*/
|
||||||
|
@ -748,7 +748,7 @@ public:
|
||||||
|
|
||||||
///! Display progress or status message.
|
///! Display progress or status message.
|
||||||
void DisplayStatus(const char*, float);
|
void DisplayStatus(const char*, float);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expand the given list file arguments into the full set after
|
* Expand the given list file arguments into the full set after
|
||||||
* variable replacement and list expansion.
|
* variable replacement and list expansion.
|
||||||
|
@ -757,13 +757,13 @@ public:
|
||||||
std::vector<std::string>& outArgs);
|
std::vector<std::string>& outArgs);
|
||||||
/**
|
/**
|
||||||
* Get the instance
|
* Get the instance
|
||||||
*/
|
*/
|
||||||
cmake *GetCMakeInstance() const;
|
cmake *GetCMakeInstance() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all the source files this makefile knows about
|
* Get all the source files this makefile knows about
|
||||||
*/
|
*/
|
||||||
const std::vector<cmSourceFile*> &GetSourceFiles() const
|
const std::vector<cmSourceFile*> &GetSourceFiles() const
|
||||||
{return this->SourceFiles;}
|
{return this->SourceFiles;}
|
||||||
std::vector<cmSourceFile*> &GetSourceFiles() {return this->SourceFiles;}
|
std::vector<cmSourceFile*> &GetSourceFiles() {return this->SourceFiles;}
|
||||||
|
|
||||||
|
@ -775,7 +775,7 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a macro to the list of macros. The arguments should be name of the
|
* Add a macro to the list of macros. The arguments should be name of the
|
||||||
* macro and a documentation signature of it
|
* macro and a documentation signature of it
|
||||||
*/
|
*/
|
||||||
void AddMacro(const char* name, const char* signature);
|
void AddMacro(const char* name, const char* signature);
|
||||||
|
|
||||||
|
@ -797,7 +797,7 @@ public:
|
||||||
*/
|
*/
|
||||||
std::string GetModulesFile(const char* name);
|
std::string GetModulesFile(const char* name);
|
||||||
|
|
||||||
///! Set/Get a property of this directory
|
///! Set/Get a property of this directory
|
||||||
void SetProperty(const char *prop, const char *value);
|
void SetProperty(const char *prop, const char *value);
|
||||||
void AppendProperty(const char *prop, const char *value,bool asString=false);
|
void AppendProperty(const char *prop, const char *value,bool asString=false);
|
||||||
const char *GetProperty(const char *prop);
|
const char *GetProperty(const char *prop);
|
||||||
|
@ -812,7 +812,7 @@ public:
|
||||||
|
|
||||||
///! Initialize a makefile from its parent
|
///! Initialize a makefile from its parent
|
||||||
void InitializeFromParent();
|
void InitializeFromParent();
|
||||||
|
|
||||||
///! Set/Get the preorder flag
|
///! Set/Get the preorder flag
|
||||||
void SetPreOrder(bool p) { this->PreOrder = p; }
|
void SetPreOrder(bool p) { this->PreOrder = p; }
|
||||||
bool GetPreOrder() const { return this->PreOrder; }
|
bool GetPreOrder() const { return this->PreOrder; }
|
||||||
|
@ -859,11 +859,11 @@ protected:
|
||||||
void CheckForUnused(const char* reason, const char* name) const;
|
void CheckForUnused(const char* reason, const char* name) const;
|
||||||
|
|
||||||
std::string Prefix;
|
std::string Prefix;
|
||||||
std::vector<std::string> AuxSourceDirectories; //
|
std::vector<std::string> AuxSourceDirectories; //
|
||||||
|
|
||||||
std::string cmStartDirectory;
|
std::string cmStartDirectory;
|
||||||
std::string StartOutputDirectory;
|
std::string StartOutputDirectory;
|
||||||
std::string cmHomeDirectory;
|
std::string cmHomeDirectory;
|
||||||
std::string HomeOutputDirectory;
|
std::string HomeOutputDirectory;
|
||||||
std::string cmCurrentListFile;
|
std::string cmCurrentListFile;
|
||||||
|
|
||||||
|
@ -875,7 +875,7 @@ protected:
|
||||||
|
|
||||||
// Tests
|
// Tests
|
||||||
std::map<cmStdString, cmTest*> Tests;
|
std::map<cmStdString, cmTest*> Tests;
|
||||||
|
|
||||||
// The include and link-library paths. These may have order
|
// The include and link-library paths. These may have order
|
||||||
// dependency, so they must be vectors (not set).
|
// dependency, so they must be vectors (not set).
|
||||||
std::vector<std::string> IncludeDirectories;
|
std::vector<std::string> IncludeDirectories;
|
||||||
|
@ -887,8 +887,8 @@ protected:
|
||||||
|
|
||||||
std::vector<std::string> ListFiles; // list of command files loaded
|
std::vector<std::string> ListFiles; // list of command files loaded
|
||||||
std::vector<std::string> OutputFiles; // list of command files loaded
|
std::vector<std::string> OutputFiles; // list of command files loaded
|
||||||
|
|
||||||
|
|
||||||
cmTarget::LinkLibraryVectorType LinkLibraries;
|
cmTarget::LinkLibraryVectorType LinkLibraries;
|
||||||
|
|
||||||
std::vector<cmInstallGenerator*> InstallGenerators;
|
std::vector<cmInstallGenerator*> InstallGenerators;
|
||||||
|
@ -911,9 +911,9 @@ protected:
|
||||||
|
|
||||||
std::vector<cmCommand*> UsedCommands;
|
std::vector<cmCommand*> UsedCommands;
|
||||||
cmLocalGenerator* LocalGenerator;
|
cmLocalGenerator* LocalGenerator;
|
||||||
bool IsFunctionBlocked(const cmListFileFunction& lff,
|
bool IsFunctionBlocked(const cmListFileFunction& lff,
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Initialize();
|
void Initialize();
|
||||||
|
|
||||||
|
@ -923,10 +923,10 @@ private:
|
||||||
|
|
||||||
void ReadSources(std::ifstream& fin, bool t);
|
void ReadSources(std::ifstream& fin, bool t);
|
||||||
friend class cmMakeDepend; // make depend needs direct access
|
friend class cmMakeDepend; // make depend needs direct access
|
||||||
// to the Sources array
|
// to the Sources array
|
||||||
void PrintStringVector(const char* s, const
|
void PrintStringVector(const char* s, const
|
||||||
std::vector<std::pair<cmStdString, bool> >& v) const;
|
std::vector<std::pair<cmStdString, bool> >& v) const;
|
||||||
void PrintStringVector(const char* s,
|
void PrintStringVector(const char* s,
|
||||||
const std::vector<std::string>& v) const;
|
const std::vector<std::string>& v) const;
|
||||||
|
|
||||||
void AddDefaultDefinitions();
|
void AddDefaultDefinitions();
|
||||||
|
@ -954,7 +954,7 @@ private:
|
||||||
bool WarnUnused;
|
bool WarnUnused;
|
||||||
bool CheckSystemVars;
|
bool CheckSystemVars;
|
||||||
|
|
||||||
// stack of list files being read
|
// stack of list files being read
|
||||||
std::deque<cmStdString> ListFileStack;
|
std::deque<cmStdString> ListFileStack;
|
||||||
|
|
||||||
// stack of commands being invoked.
|
// stack of commands being invoked.
|
||||||
|
|
|
@ -180,8 +180,8 @@ static const char * cmDocumentationOptions[][3] =
|
||||||
{"--build-project", "Specify the name of the project to build.", "" },
|
{"--build-project", "Specify the name of the project to build.", "" },
|
||||||
{"--build-makeprogram", "Specify the make program to use.", "" },
|
{"--build-makeprogram", "Specify the make program to use.", "" },
|
||||||
{"--build-noclean", "Skip the make clean step.", "" },
|
{"--build-noclean", "Skip the make clean step.", "" },
|
||||||
{"--build-config-sample",
|
{"--build-config-sample",
|
||||||
"A sample executable to use to determine the configuration",
|
"A sample executable to use to determine the configuration",
|
||||||
"A sample executable to use to determine the configuration that "
|
"A sample executable to use to determine the configuration that "
|
||||||
"should be used. e.g. Debug/Release/etc" },
|
"should be used. e.g. Debug/Release/etc" },
|
||||||
{"--build-options", "Add extra options to the build step.",
|
{"--build-options", "Add extra options to the build step.",
|
||||||
|
@ -276,7 +276,7 @@ int main (int argc, char *argv[])
|
||||||
// If there is a testing input file, check for documentation options
|
// If there is a testing input file, check for documentation options
|
||||||
// only if there are actually arguments. We want running without
|
// only if there are actually arguments. We want running without
|
||||||
// arguments to run tests.
|
// arguments to run tests.
|
||||||
if(argc > 1 || !(cmSystemTools::FileExists("CTestTestfile.cmake") ||
|
if(argc > 1 || !(cmSystemTools::FileExists("CTestTestfile.cmake") ||
|
||||||
cmSystemTools::FileExists("DartTestfile.txt")))
|
cmSystemTools::FileExists("DartTestfile.txt")))
|
||||||
{
|
{
|
||||||
if(argc == 1)
|
if(argc == 1)
|
||||||
|
|
Loading…
Reference in New Issue