STYLE: fix line lengths

This commit is contained in:
Bill Hoffman 2006-03-10 13:54:57 -05:00
parent 509e383aac
commit 89e5fc63fe
46 changed files with 339 additions and 169 deletions

View File

@ -189,16 +189,24 @@ struct yy_buffer_state
#endif /* !YY_STRUCT_YY_BUFFER_STATE */ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
void cmCommandArgument_yyrestart (FILE *input_file ,yyscan_t yyscanner ); void cmCommandArgument_yyrestart (FILE *input_file ,yyscan_t yyscanner );
void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,
YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); yyscan_t yyscanner );
void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE *file,int size ,
void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); yyscan_t yyscanner );
void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b ,
yyscan_t yyscanner );
void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b ,
yyscan_t yyscanner );
void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,
yyscan_t yyscanner );
void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner ); void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner );
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 ,
YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); yyscan_t yyscanner );
YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char *yy_str ,
yyscan_t yyscanner );
YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char *bytes,int len ,
yyscan_t yyscanner );
void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner ); void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner );
void *cmCommandArgument_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); void *cmCommandArgument_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
@ -231,7 +239,8 @@ void cmCommandArgument_yyset_debug (int debug_flag ,yyscan_t yyscanner );
YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner ); YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner );
void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined ,
yyscan_t yyscanner );
FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner ); FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner );
@ -294,7 +303,8 @@ extern int cmCommandArgument_yylex (yyscan_t yyscanner);
#define YY_DECL int cmCommandArgument_yylex (yyscan_t yyscanner) #define YY_DECL int cmCommandArgument_yylex (yyscan_t yyscanner)
#endif /* !YY_DECL */ #endif /* !YY_DECL */
/* yy_get_previous_state - get the state just before the EOB char was reached */ /* yy_get_previous_state - get the state just before
the EOB char was reached */
#undef YY_NEW_FILE #undef YY_NEW_FILE
#undef YY_FLUSH_BUFFER #undef YY_FLUSH_BUFFER

View File

@ -1,7 +1,7 @@
/* A Bison parser, made by GNU Bison 1.875d. */ /* A Bison parser, made by GNU Bison 1.875d. */
/* Skeleton parser for Yacc-like parsing with Bison, /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@ -185,16 +185,22 @@ struct yy_buffer_state
#endif /* !YY_STRUCT_YY_BUFFER_STATE */ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
void cmDependsJava_yyrestart (FILE *input_file ,yyscan_t yyscanner ); void cmDependsJava_yyrestart (FILE *input_file ,yyscan_t yyscanner );
void cmDependsJava_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void cmDependsJava_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,
YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); yyscan_t yyscanner );
YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE *file,int size ,
yyscan_t yyscanner );
void cmDependsJava_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void cmDependsJava_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void cmDependsJava_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void cmDependsJava_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void cmDependsJava_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void cmDependsJava_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,
yyscan_t yyscanner );
void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner ); void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner );
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 ,
YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); yyscan_t yyscanner );
YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char *yy_str ,
yyscan_t yyscanner );
YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char *bytes,int len ,
yyscan_t yyscanner );
void *cmDependsJava_yyalloc (yy_size_t ,yyscan_t yyscanner ); void *cmDependsJava_yyalloc (yy_size_t ,yyscan_t yyscanner );
void *cmDependsJava_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); void *cmDependsJava_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
@ -229,7 +235,8 @@ void cmDependsJava_yyset_debug (int debug_flag ,yyscan_t yyscanner );
YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner ); YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner );
void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined ,
yyscan_t yyscanner );
FILE *cmDependsJava_yyget_in (yyscan_t yyscanner ); FILE *cmDependsJava_yyget_in (yyscan_t yyscanner );
@ -292,7 +299,8 @@ extern int cmDependsJava_yylex (yyscan_t yyscanner);
#define YY_DECL int cmDependsJava_yylex (yyscan_t yyscanner) #define YY_DECL int cmDependsJava_yylex (yyscan_t yyscanner)
#endif /* !YY_DECL */ #endif /* !YY_DECL */
/* yy_get_previous_state - get the state just before the EOB char was reached */ /* yy_get_previous_state - get the state just before the
EOB char was reached */
#undef YY_NEW_FILE #undef YY_NEW_FILE
#undef YY_FLUSH_BUFFER #undef YY_FLUSH_BUFFER

View File

@ -75,7 +75,8 @@ private:
cmStdString Name; cmStdString Name;
std::vector<CurrentClass> NestedClasses; std::vector<CurrentClass> NestedClasses;
CurrentClass() {} CurrentClass() {}
void AddFileNamesForPrinting(std::vector<cmStdString> *files, const char* prefix, const char* sep); void AddFileNamesForPrinting(std::vector<cmStdString> *files,
const char* prefix, const char* sep);
}; };
cmStdString CurrentPackage; cmStdString CurrentPackage;
cmStdString::size_type InputBufferPos; cmStdString::size_type InputBufferPos;

View File

@ -1,7 +1,7 @@
/* A Bison parser, made by GNU Bison 1.875d. */ /* A Bison parser, made by GNU Bison 1.875d. */
/* Skeleton parser for Yacc-like parsing with Bison, /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@ -59,7 +59,9 @@ public:
*/ */
virtual const char* GetTerseDocumentation() virtual const char* GetTerseDocumentation()
{ {
return "Run and executable program during the processing of the CMakeList.txt file."; return
"Run and executable program during the processing of the CMakeList.txt"
" file.";
} }
/** /**

View File

@ -189,16 +189,22 @@ struct yy_buffer_state
#endif /* !YY_STRUCT_YY_BUFFER_STATE */ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
void cmExpr_yyrestart (FILE *input_file ,yyscan_t yyscanner ); void cmExpr_yyrestart (FILE *input_file ,yyscan_t yyscanner );
void cmExpr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void cmExpr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,
YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); yyscan_t yyscanner );
YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE *file,int size ,
yyscan_t yyscanner );
void cmExpr_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void cmExpr_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void cmExpr_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); void cmExpr_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void cmExpr_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); void cmExpr_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,
yyscan_t yyscanner );
void cmExpr_yypop_buffer_state (yyscan_t yyscanner ); void cmExpr_yypop_buffer_state (yyscan_t yyscanner );
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 ,
YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); yyscan_t yyscanner );
YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char *yy_str ,
yyscan_t yyscanner );
YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char *bytes,int len ,
yyscan_t yyscanner );
void *cmExpr_yyalloc (yy_size_t ,yyscan_t yyscanner ); void *cmExpr_yyalloc (yy_size_t ,yyscan_t yyscanner );
void *cmExpr_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); void *cmExpr_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );

View File

@ -1,7 +1,7 @@
/* A Bison parser, made by GNU Bison 1.875d. */ /* A Bison parser, made by GNU Bison 1.875d. */
/* Skeleton parser for Yacc-like parsing with Bison, /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@ -22,7 +22,8 @@
/** \class cmFLTKWrapUICommand /** \class cmFLTKWrapUICommand
* \brief Create .h and .cxx files rules for FLTK user interfaces files * \brief Create .h and .cxx files rules for FLTK user interfaces files
* *
* cmFLTKWrapUICommand is used to create wrappers for FLTK classes into normal C++ * cmFLTKWrapUICommand is used to create wrappers for FLTK classes into
* normal C++
*/ */
class cmFLTKWrapUICommand : public cmCommand class cmFLTKWrapUICommand : public cmCommand
{ {

View File

@ -97,7 +97,8 @@ public:
"Examples of recursive globbing include:\n" "Examples of recursive globbing include:\n"
" /dir/*.py - match all python files in /dir and subdirectories\n" " /dir/*.py - match all python files in /dir and subdirectories\n"
"MAKE_DIRECTORY will create a directory at the specified location\n" "MAKE_DIRECTORY will create a directory at the specified location\n"
"RELATIVE_PATH will determine relative path from directory to the given file"; "RELATIVE_PATH will determine relative path from directory to the given"
" file";
} }
cmTypeMacro(cmFileCommand, cmCommand); cmTypeMacro(cmFileCommand, cmCommand);

View File

@ -59,8 +59,9 @@ protected:
std::vector<std::string> Names; std::vector<std::string> Names;
std::vector<std::string> SearchPaths; std::vector<std::string> SearchPaths;
std::vector<std::string> SearchPathSuffixes; std::vector<std::string> SearchPathSuffixes;
cmStdString CMakePathName; // CMAKE_*_PATH CMAKE_SYSTEM_*_PATH FRAMEWORK|LIBRARY|INCLUDE|PROGRAM // CMAKE_*_PATH CMAKE_SYSTEM_*_PATH FRAMEWORK|LIBRARY|INCLUDE|PROGRAM
cmStdString CMakePathName;
cmStdString EnvironmentPath; // LIB,INCLUDE cmStdString EnvironmentPath; // LIB,INCLUDE
bool AlreadyInCache; bool AlreadyInCache;

View File

@ -28,7 +28,8 @@ class cmGlobalBorlandMakefileGenerator : public cmGlobalNMakeMakefileGenerator
{ {
public: public:
cmGlobalBorlandMakefileGenerator(); cmGlobalBorlandMakefileGenerator();
static cmGlobalGenerator* New() { return new cmGlobalBorlandMakefileGenerator; } static cmGlobalGenerator* New()
{ return new cmGlobalBorlandMakefileGenerator; }
///! Get the name for the generator. ///! Get the name for the generator.
virtual const char* GetName() const { virtual const char* GetName() const {
@ -45,7 +46,8 @@ public:
* 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, cmMakefile *); virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *);
}; };
#endif #endif

View File

@ -73,7 +73,8 @@ public:
* 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, cmMakefile *); virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *);
/** /**
* Try to determine system infomation, get it from another generator * Try to determine system infomation, get it from another generator
@ -101,7 +102,8 @@ public:
const char *makeProgram, const char *config, const char *makeProgram, const char *config,
bool clean); bool clean);
virtual std::string GenerateBuildCommand(const char* makeProgram, virtual std::string GenerateBuildCommand(const char* makeProgram,
const char *projectName, const char* additionalOptions, const char *targetName, const char *projectName, const char* additionalOptions,
const char *targetName,
const char* config, bool ignoreErrors); const char* config, bool ignoreErrors);
///! Set the CMake instance ///! Set the CMake instance
@ -114,7 +116,8 @@ public:
void SetConfiguredFilesPath(const char* s){m_ConfiguredFilesPath = s;} void SetConfiguredFilesPath(const char* s){m_ConfiguredFilesPath = s;}
cmLocalGenerator* GetLocalGenerator(int p) { return m_LocalGenerators[p];} cmLocalGenerator* GetLocalGenerator(int p) { return m_LocalGenerators[p];}
void GetLocalGenerators(std::vector<cmLocalGenerator *>&g) { g = m_LocalGenerators;} void GetLocalGenerators(std::vector<cmLocalGenerator *>&g)
{ g = m_LocalGenerators;}
void AddLocalGenerator(cmLocalGenerator *lg); void AddLocalGenerator(cmLocalGenerator *lg);
static int s_TryCompileTimeout; static int s_TryCompileTimeout;
@ -164,7 +167,8 @@ public:
std::string& dir); std::string& dir);
protected: protected:
// Fill the m_ProjectMap, this must be called after m_LocalGenerators has been populated. // Fill the m_ProjectMap, this must be called after m_LocalGenerators
// has been populated.
void FillProjectMap(); void FillProjectMap();
bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen); bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen);

View File

@ -44,7 +44,8 @@ public:
* 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, cmMakefile *); virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *);
private: private:
std::string FindMinGW(std::string const& makeloc); std::string FindMinGW(std::string const& makeloc);

View File

@ -44,7 +44,8 @@ public:
* 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, cmMakefile *); virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *);
}; };
#endif #endif

View File

@ -44,7 +44,8 @@ public:
* 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, cmMakefile *); virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *);
}; };
#endif #endif

View File

@ -75,7 +75,8 @@ public:
* 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, cmMakefile *); virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *);
/** /**
* Generate the all required files for building this project/tree. This * Generate the all required files for building this project/tree. This

View File

@ -55,8 +55,11 @@ 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* additionalOptions, const char *targetName, const char* config, const char *projectName,
bool ignoreErrors); const char* additionalOptions,
const char *targetName,
const char* config,
bool ignoreErrors);
/** /**
* Generate the all required files for building this project/tree. This * Generate the all required files for building this project/tree. This

View File

@ -29,7 +29,8 @@ class cmGlobalVisualStudio71Generator : public cmGlobalVisualStudio7Generator
{ {
public: public:
cmGlobalVisualStudio71Generator(); cmGlobalVisualStudio71Generator();
static cmGlobalGenerator* New() { return new cmGlobalVisualStudio71Generator; } static cmGlobalGenerator* New()
{ return new cmGlobalVisualStudio71Generator; }
///! Get the name for the generator. ///! Get the name for the generator.
virtual const char* GetName() const { virtual const char* GetName() const {
@ -51,8 +52,10 @@ protected:
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, const char* name, bool in_all); virtual void WriteProjectConfigurations(std::ostream& fout, const char* name,
virtual void WriteExternalProject(std::ostream& fout, const char* name, const char* path, bool in_all);
virtual void WriteExternalProject(std::ostream& fout, const char* name,
const char* path,
const std::vector<std::string>& depends); const std::vector<std::string>& depends);
virtual void WriteSLNFooter(std::ostream& fout); virtual void WriteSLNFooter(std::ostream& fout);
virtual void WriteSLNHeader(std::ostream& fout); virtual void WriteSLNHeader(std::ostream& fout);

View File

@ -47,15 +47,19 @@ public:
* 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, cmMakefile *); virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *);
/** /**
* 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.
*/ */
virtual std::string GenerateBuildCommand(const char* makeProgram, virtual std::string GenerateBuildCommand(const char* makeProgram,
const char *projectName, const char* additionalOptions, const char *targetName, const char* config, const char *projectName,
bool ignoreErrors); const char* additionalOptions,
const char *targetName,
const char* config,
bool ignoreErrors);
/** /**
* Generate the all required files for building this project/tree. This * Generate the all required files for building this project/tree. This
@ -99,7 +103,8 @@ protected:
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, const char* name, bool in_all); virtual void WriteProjectConfigurations(std::ostream& fout, const char* name,
bool in_all);
virtual void WriteSLNFooter(std::ostream& fout); virtual void WriteSLNFooter(std::ostream& fout);
virtual void WriteSLNHeader(std::ostream& fout); virtual void WriteSLNHeader(std::ostream& fout);

View File

@ -44,7 +44,8 @@ public:
* 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, cmMakefile *); virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *);
}; };
#endif #endif

View File

@ -59,8 +59,11 @@ 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* additionalOptions, const char *targetName, const char *projectName,
const char* config, bool ignoreErrors); const char* additionalOptions,
const char *targetName,
const char* config,
bool ignoreErrors);
/** /**
* Generate the all required files for building this project/tree. This * Generate the all required files for building this project/tree. This

View File

@ -65,7 +65,8 @@ public:
{ {
return return
" LIST(LENGTH <list> <output variable>)\n" " LIST(LENGTH <list> <output variable>)\n"
" LIST(GET <list> <element index> [<element index> ...] <output variable>)\n" " LIST(GET <list> <element index> [<element index> ...] "
"<output variable>)\n"
" LIST(SET <list> <element> [<element> ...])\n" " LIST(SET <list> <element> [<element> ...])\n"
" LIST(INSERT <list> <element_index> <element> [<element> ...])\n" " LIST(INSERT <list> <element_index> <element> [<element> ...])\n"
" LIST(REMOVE <variable> <value> [<value> ...])\n" " LIST(REMOVE <variable> <value> [<value> ...])\n"
@ -76,8 +77,8 @@ public:
"GET will return list of elements specified by indices from the list.\n" "GET will return list of elements specified by indices from the list.\n"
"SET will append elements to the list.\n" "SET will append elements to the list.\n"
"INSERT will insert elements to the list to the specified location.\n" "INSERT will insert elements to the list to the specified location.\n"
"When specifying an index, negative value corresponds to index from the end " "When specifying an index, negative value corresponds to index from the"
"of the list.\n" " end of the list.\n"
; ;
} }

View File

@ -155,7 +155,8 @@ public:
bool /* clear */) {}; bool /* clear */) {};
/** Called from command-line hook to scan dependencies. */ /** Called from command-line hook to scan dependencies. */
virtual bool ScanDependencies(std::vector<std::string> const& /* args */) {return true;}; virtual bool ScanDependencies(std::vector<std::string> const& /* args */)
{return true;};
/** Compute the list of link libraries and directories for the given /** Compute the list of link libraries and directories for the given
target and configuration. */ target and configuration. */
@ -205,7 +206,8 @@ protected:
const char* workingDirectory, const char* workingDirectory,
const char* newline = "\n"); const char* newline = "\n");
///! Fill out these strings for the given target. Libraries to link, flags, and linkflags. /** Fill out these strings for the given target. Libraries to link,
* 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,
@ -221,7 +223,8 @@ protected:
std::string ExpandRuleVariable(std::string const& variable, std::string ExpandRuleVariable(std::string const& variable,
const RuleVariables& replaceValues); const RuleVariables& replaceValues);
///! Convert a target to a utility target for unsupported languages of a generator /** Convert a target to a utility target for unsupported
* 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,

View File

@ -191,7 +191,8 @@ public:
// language has its own list because integrity may be checked // language has its own list because integrity may be checked
// differently. // differently.
struct IntegrityCheckSet: public std::set<cmSourceFile *> {}; struct IntegrityCheckSet: public std::set<cmSourceFile *> {};
struct IntegrityCheckSetMap: public std::map<cmStdString, IntegrityCheckSet> {}; struct IntegrityCheckSetMap: public std::map<cmStdString, IntegrityCheckSet>
{};
std::map<cmStdString, IntegrityCheckSetMap> &GetIntegrityCheckSet() std::map<cmStdString, IntegrityCheckSetMap> &GetIntegrityCheckSet()
{ return m_CheckDependFiles;} { return m_CheckDependFiles;}

View File

@ -212,7 +212,8 @@ const std::string& cmSourceFile::GetSourceNameWithoutLastExtension()
{ {
if ( m_SourceNameWithoutLastExtension.empty() ) if ( m_SourceNameWithoutLastExtension.empty() )
{ {
m_SourceNameWithoutLastExtension = cmSystemTools::GetFilenameWithoutLastExtension(m_FullPath); m_SourceNameWithoutLastExtension =
cmSystemTools::GetFilenameWithoutLastExtension(m_FullPath);
} }
return m_SourceNameWithoutLastExtension; return m_SourceNameWithoutLastExtension;
} }

View File

@ -226,7 +226,8 @@ bool cmStringCommand::HandleRegexCommand(std::vector<std::string> const& args)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool cmStringCommand::RegexMatch(std::vector<std::string> const& args) bool cmStringCommand::RegexMatch(std::vector<std::string> const& args)
{ {
//"STRING(REGEX MATCH <regular_expression> <output variable> <input> [<input>...])\n"; //"STRING(REGEX MATCH <regular_expression> <output variable>
// <input> [<input>...])\n";
std::string regex = args[2]; std::string regex = args[2];
std::string outvar = args[3]; std::string outvar = args[3];
@ -241,7 +242,8 @@ bool cmStringCommand::RegexMatch(std::vector<std::string> const& args)
cmsys::RegularExpression re; cmsys::RegularExpression re;
if(!re.compile(regex.c_str())) if(!re.compile(regex.c_str()))
{ {
std::string e = "sub-command REGEX, mode MATCH failed to compile regex \""+regex+"\"."; std::string e =
"sub-command REGEX, mode MATCH failed to compile regex \""+regex+"\".";
this->SetError(e.c_str()); this->SetError(e.c_str());
return false; return false;
} }
@ -254,7 +256,9 @@ bool cmStringCommand::RegexMatch(std::vector<std::string> const& args)
std::string::size_type r = re.end(); std::string::size_type r = re.end();
if(r-l == 0) if(r-l == 0)
{ {
std::string e = "sub-command REGEX, mode MATCH regex \""+regex+"\" matched an empty string."; std::string e =
"sub-command REGEX, mode MATCH regex \""+regex+
"\" matched an empty string.";
this->SetError(e.c_str()); this->SetError(e.c_str());
return false; return false;
} }
@ -269,7 +273,8 @@ bool cmStringCommand::RegexMatch(std::vector<std::string> const& args)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool cmStringCommand::RegexMatchAll(std::vector<std::string> const& args) bool cmStringCommand::RegexMatchAll(std::vector<std::string> const& args)
{ {
//"STRING(REGEX MATCHALL <regular_expression> <output variable> <input> [<input>...])\n"; //"STRING(REGEX MATCHALL <regular_expression> <output variable> <input>
// [<input>...])\n";
std::string regex = args[2]; std::string regex = args[2];
std::string outvar = args[3]; std::string outvar = args[3];
@ -284,7 +289,9 @@ bool cmStringCommand::RegexMatchAll(std::vector<std::string> const& args)
cmsys::RegularExpression re; cmsys::RegularExpression re;
if(!re.compile(regex.c_str())) if(!re.compile(regex.c_str()))
{ {
std::string e = "sub-command REGEX, mode MATCHALL failed to compile regex \""+regex+"\"."; std::string e =
"sub-command REGEX, mode MATCHALL failed to compile regex \""+
regex+"\".";
this->SetError(e.c_str()); this->SetError(e.c_str());
return false; return false;
} }
@ -298,7 +305,8 @@ bool cmStringCommand::RegexMatchAll(std::vector<std::string> const& args)
std::string::size_type r = re.end(); std::string::size_type r = re.end();
if(r-l == 0) if(r-l == 0)
{ {
std::string e = "sub-command REGEX, mode MATCHALL regex \""+regex+"\" matched an empty string."; std::string e = "sub-command REGEX, mode MATCHALL regex \""+
regex+"\" matched an empty string.";
this->SetError(e.c_str()); this->SetError(e.c_str());
return false; return false;
} }
@ -318,7 +326,8 @@ bool cmStringCommand::RegexMatchAll(std::vector<std::string> const& args)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool cmStringCommand::RegexReplace(std::vector<std::string> const& args) bool cmStringCommand::RegexReplace(std::vector<std::string> const& args)
{ {
//"STRING(REGEX REPLACE <regular_expression> <replace_expression> <output variable> <input> [<input>...])\n" //"STRING(REGEX REPLACE <regular_expression> <replace_expression>
// <output variable> <input> [<input>...])\n"
std::string regex = args[2]; std::string regex = args[2];
std::string replace = args[3]; std::string replace = args[3];
std::string outvar = args[4]; std::string outvar = args[4];
@ -382,7 +391,9 @@ bool cmStringCommand::RegexReplace(std::vector<std::string> const& args)
cmsys::RegularExpression re; cmsys::RegularExpression re;
if(!re.compile(regex.c_str())) if(!re.compile(regex.c_str()))
{ {
std::string e = "sub-command REGEX, mode REPLACE failed to compile regex \""+regex+"\"."; std::string e =
"sub-command REGEX, mode REPLACE failed to compile regex \""+
regex+"\".";
this->SetError(e.c_str()); this->SetError(e.c_str());
return false; return false;
} }
@ -401,7 +412,8 @@ bool cmStringCommand::RegexReplace(std::vector<std::string> const& args)
// Make sure the match had some text. // Make sure the match had some text.
if(r-l2 == 0) if(r-l2 == 0)
{ {
std::string e = "sub-command REGEX, mode REPLACE regex \""+regex+"\" matched an empty string."; std::string e = "sub-command REGEX, mode REPLACE regex \""+
regex+"\" matched an empty string.";
this->SetError(e.c_str()); this->SetError(e.c_str());
return false; return false;
} }
@ -451,7 +463,8 @@ bool cmStringCommand::RegexReplace(std::vector<std::string> const& args)
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool cmStringCommand::HandleCompareCommand(std::vector<std::string> const& args) bool cmStringCommand::HandleCompareCommand(std::vector<std::string> const&
args)
{ {
if(args.size() < 2) if(args.size() < 2)
{ {
@ -507,7 +520,8 @@ bool cmStringCommand::HandleCompareCommand(std::vector<std::string> const& args)
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool cmStringCommand::HandleReplaceCommand(std::vector<std::string> const& args) bool cmStringCommand::HandleReplaceCommand(std::vector<std::string> const&
args)
{ {
if(args.size() < 5) if(args.size() < 5)
{ {
@ -525,14 +539,16 @@ bool cmStringCommand::HandleReplaceCommand(std::vector<std::string> const& args)
input += args[i]; input += args[i];
} }
cmsys::SystemTools::ReplaceString(input, matchExpression.c_str(), replaceExpression.c_str()); cmsys::SystemTools::ReplaceString(input, matchExpression.c_str(),
replaceExpression.c_str());
m_Makefile->AddDefinition(variableName.c_str(), input.c_str()); m_Makefile->AddDefinition(variableName.c_str(), input.c_str());
return true; return true;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool cmStringCommand::HandleSubstringCommand(std::vector<std::string> const& args) bool cmStringCommand::HandleSubstringCommand(std::vector<std::string> const&
args)
{ {
if(args.size() != 5) if(args.size() != 5)
{ {
@ -550,7 +566,8 @@ bool cmStringCommand::HandleSubstringCommand(std::vector<std::string> const& arg
if ( begin < 0 || begin > intStringLength ) if ( begin < 0 || begin > intStringLength )
{ {
cmOStringStream ostr; cmOStringStream ostr;
ostr << "begin index: " << begin << " is out of range 0 - " << stringLength; ostr << "begin index: " << begin << " is out of range 0 - "
<< stringLength;
this->SetError(ostr.str().c_str()); this->SetError(ostr.str().c_str());
return false; return false;
} }
@ -558,12 +575,14 @@ bool cmStringCommand::HandleSubstringCommand(std::vector<std::string> const& arg
if ( end < 0 || end > leftOverLength ) if ( end < 0 || end > leftOverLength )
{ {
cmOStringStream ostr; cmOStringStream ostr;
ostr << "end index: " << end << " is out of range " << 0 << " - " << leftOverLength; ostr << "end index: " << end << " is out of range " << 0 << " - "
<< leftOverLength;
this->SetError(ostr.str().c_str()); this->SetError(ostr.str().c_str());
return false; return false;
} }
m_Makefile->AddDefinition(variableName.c_str(), stringValue.substr(begin, end).c_str()); m_Makefile->AddDefinition(variableName.c_str(),
stringValue.substr(begin, end).c_str());
return true; return true;
} }

View File

@ -290,7 +290,8 @@ void cmSystemTools::Message(const char* m1, const char *title)
} }
if(s_ErrorCallback) if(s_ErrorCallback)
{ {
(*s_ErrorCallback)(m1, title, s_DisableMessages, s_ErrorCallbackClientData); (*s_ErrorCallback)(m1, title, s_DisableMessages,
s_ErrorCallbackClientData);
return; return;
} }
else else
@ -368,8 +369,10 @@ std::vector<cmStdString> cmSystemTools::ParseArguments(const char* command)
bool win_path = false; bool win_path = false;
if ( command[0] != '/' && command[1] == ':' && command[2] == '\\' || if ( command[0] != '/' && command[1] == ':' && command[2] == '\\' ||
command[0] == '\"' && command[1] != '/' && command[2] == ':' && command[3] == '\\' || command[0] == '\"' && command[1] != '/' && command[2] == ':'
command[0] == '\'' && command[1] != '/' && command[2] == ':' && command[3] == '\\' || && command[3] == '\\' ||
command[0] == '\'' && command[1] != '/' && command[2] == ':'
&& command[3] == '\\' ||
command[0] == '\\' && command[1] == '\\') command[0] == '\\' && command[1] == '\\')
{ {
win_path = true; win_path = true;
@ -599,10 +602,12 @@ bool RunCommandViaWin32(const char* command,
int timeout) int timeout)
{ {
#if defined(__BORLANDC__) #if defined(__BORLANDC__)
return cmWin32ProcessExecution::BorlandRunCommand(command, dir, output, return
retVal, cmWin32ProcessExecution::
verbose, timeout, BorlandRunCommand(command, dir, output,
cmSystemTools::GetRunCommandHideConsole()); retVal,
verbose, timeout,
cmSystemTools::GetRunCommandHideConsole());
#else // Visual studio #else // Visual studio
::SetLastError(ERROR_SUCCESS); ::SetLastError(ERROR_SUCCESS);
if ( ! command ) if ( ! command )
@ -1137,7 +1142,8 @@ cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext)
ext == "for" || ext == ".for" || ext == "for" || ext == ".for" ||
ext == "f95" || ext == ".f95" ext == "f95" || ext == ".f95"
) { return cmSystemTools::FORTRAN_FILE_FORMAT; } ) { return cmSystemTools::FORTRAN_FILE_FORMAT; }
if ( ext == "java" || ext == ".java" ) { return cmSystemTools::JAVA_FILE_FORMAT; } if ( ext == "java" || ext == ".java" )
{ return cmSystemTools::JAVA_FILE_FORMAT; }
if ( if (
ext == "H" || ext == ".H" || ext == "H" || ext == ".H" ||
ext == "h" || ext == ".h" || ext == "h" || ext == ".h" ||
@ -1148,12 +1154,16 @@ cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext)
ext == "in" || ext == ".in" || ext == "in" || ext == ".in" ||
ext == "txx" || ext == ".txx" ext == "txx" || ext == ".txx"
) { return cmSystemTools::HEADER_FILE_FORMAT; } ) { return cmSystemTools::HEADER_FILE_FORMAT; }
if ( ext == "rc" || ext == ".rc" ) { return cmSystemTools::RESOURCE_FILE_FORMAT; } if ( ext == "rc" || ext == ".rc" )
if ( ext == "def" || ext == ".def" ) { return cmSystemTools::DEFINITION_FILE_FORMAT; } { return cmSystemTools::RESOURCE_FILE_FORMAT; }
if ( ext == "def" || ext == ".def" )
{ return cmSystemTools::DEFINITION_FILE_FORMAT; }
if ( ext == "lib" || ext == ".lib" || if ( ext == "lib" || ext == ".lib" ||
ext == "a" || ext == ".a") { return cmSystemTools::STATIC_LIBRARY_FILE_FORMAT; } ext == "a" || ext == ".a")
{ return cmSystemTools::STATIC_LIBRARY_FILE_FORMAT; }
if ( ext == "o" || ext == ".o" || if ( ext == "o" || ext == ".o" ||
ext == "obj" || ext == ".obj") { return cmSystemTools::OBJECT_FILE_FORMAT; } ext == "obj" || ext == ".obj")
{ return cmSystemTools::OBJECT_FILE_FORMAT; }
#ifdef __APPLE__ #ifdef __APPLE__
if ( ext == "dylib" || ext == ".dylib" ) if ( ext == "dylib" || ext == ".dylib" )
{ return cmSystemTools::SHARED_LIBRARY_FILE_FORMAT; } { return cmSystemTools::SHARED_LIBRARY_FILE_FORMAT; }
@ -1231,11 +1241,13 @@ std::string cmSystemTools::RelativePath(const char* local, const char* remote)
{ {
if(!cmSystemTools::FileIsFullPath(local)) if(!cmSystemTools::FileIsFullPath(local))
{ {
cmSystemTools::Error("RelativePath must be passed a full path to local: ", local); cmSystemTools::Error("RelativePath must be passed a full path to local: ",
local);
} }
if(!cmSystemTools::FileIsFullPath(remote)) if(!cmSystemTools::FileIsFullPath(remote))
{ {
cmSystemTools::Error("RelativePath must be passed a full path to remote: ", remote); cmSystemTools::Error("RelativePath must be passed a full path to remote: ",
remote);
} }
return cmsys::SystemTools::RelativePath(local, remote); return cmsys::SystemTools::RelativePath(local, remote);
} }
@ -1288,7 +1300,8 @@ std::string cmSystemTools::MakeXMLSafe(const char* str)
for ( ;*pos; ++pos) for ( ;*pos; ++pos)
{ {
char ch = *pos; char ch = *pos;
if ( (ch > 126 || ch < 32) && ch != 9 && ch != 10 && ch != 13 && ch != '\r' ) if ( (ch > 126 || ch < 32) && ch != 9 && ch != 10 && ch != 13
&& ch != '\r' )
{ {
char buffer[33]; char buffer[33];
sprintf(buffer, "&lt;%d&gt;", (int)ch); sprintf(buffer, "&lt;%d&gt;", (int)ch);
@ -1349,13 +1362,16 @@ struct cmSystemToolsGZStruct
}; };
extern "C" { extern "C" {
int cmSystemToolsGZStructOpen(void* call_data, const char *pathname, int oflags, mode_t mode); int cmSystemToolsGZStructOpen(void* call_data, const char *pathname,
int oflags, mode_t mode);
int cmSystemToolsGZStructClose(void* call_data); int cmSystemToolsGZStructClose(void* call_data);
ssize_t cmSystemToolsGZStructRead(void* call_data, void* buf, size_t count); ssize_t cmSystemToolsGZStructRead(void* call_data, void* buf, size_t count);
ssize_t cmSystemToolsGZStructWrite(void* call_data, const void* buf, size_t count); ssize_t cmSystemToolsGZStructWrite(void* call_data, const void* buf,
size_t count);
} }
int cmSystemToolsGZStructOpen(void* call_data, const char *pathname, int oflags, mode_t mode) int cmSystemToolsGZStructOpen(void* call_data, const char *pathname,
int oflags, mode_t mode)
{ {
const char *gzoflags; const char *gzoflags;
int fd; int fd;
@ -1411,7 +1427,8 @@ ssize_t cmSystemToolsGZStructRead(void* call_data, void* buf, size_t count)
return cm_zlib_gzread(gzf->GZFile, buf, count); return cm_zlib_gzread(gzf->GZFile, buf, count);
} }
ssize_t cmSystemToolsGZStructWrite(void* call_data, const void* buf, size_t count) ssize_t cmSystemToolsGZStructWrite(void* call_data, const void* buf,
size_t count)
{ {
cmSystemToolsGZStruct* gzf = static_cast<cmSystemToolsGZStruct*>(call_data); cmSystemToolsGZStruct* gzf = static_cast<cmSystemToolsGZStruct*>(call_data);
return cm_zlib_gzwrite(gzf->GZFile, (void*)buf, count); return cm_zlib_gzwrite(gzf->GZFile, (void*)buf, count);
@ -1419,7 +1436,9 @@ ssize_t cmSystemToolsGZStructWrite(void* call_data, const void* buf, size_t coun
#endif #endif
bool cmSystemTools::CreateTar(const char* outFileName, const std::vector<cmStdString>& files, bool gzip, bool verbose) bool cmSystemTools::CreateTar(const char* outFileName,
const std::vector<cmStdString>& files,
bool gzip, bool verbose)
{ {
#if defined(CMAKE_BUILD_WITH_CMAKE) #if defined(CMAKE_BUILD_WITH_CMAKE)
TAR *t; TAR *t;
@ -1459,7 +1478,8 @@ bool cmSystemTools::CreateTar(const char* outFileName, const std::vector<cmStdSt
if (tar_append_tree(t, buf, pathname) != 0) if (tar_append_tree(t, buf, pathname) != 0)
{ {
cmOStringStream ostr; cmOStringStream ostr;
ostr << "Problem with tar_append_tree(\"" << buf << "\", \"" << pathname << "\"): " ostr << "Problem with tar_append_tree(\"" << buf << "\", \""
<< pathname << "\"): "
<< strerror(errno); << strerror(errno);
cmSystemTools::Error(ostr.str().c_str()); cmSystemTools::Error(ostr.str().c_str());
tar_close(t); tar_close(t);
@ -1485,7 +1505,9 @@ bool cmSystemTools::CreateTar(const char* outFileName, const std::vector<cmStdSt
#endif #endif
} }
bool cmSystemTools::ExtractTar(const char* outFileName, const std::vector<cmStdString>& files, bool gzip, bool verbose) bool cmSystemTools::ExtractTar(const char* outFileName,
const std::vector<cmStdString>& files,
bool gzip, bool verbose)
{ {
(void)files; (void)files;
#if defined(CMAKE_BUILD_WITH_CMAKE) #if defined(CMAKE_BUILD_WITH_CMAKE)
@ -1535,7 +1557,9 @@ bool cmSystemTools::ExtractTar(const char* outFileName, const std::vector<cmStdS
#endif #endif
} }
bool cmSystemTools::ListTar(const char* outFileName, std::vector<cmStdString>& files, bool gzip, bool verbose) bool cmSystemTools::ListTar(const char* outFileName,
std::vector<cmStdString>& files, bool gzip,
bool verbose)
{ {
#if defined(CMAKE_BUILD_WITH_CMAKE) #if defined(CMAKE_BUILD_WITH_CMAKE)
TAR *t; TAR *t;
@ -1586,7 +1610,8 @@ bool cmSystemTools::ListTar(const char* outFileName, std::vector<cmStdString>& f
#endif #endif
if (TH_ISREG(t) && tar_skip_regfile(t) != 0) if (TH_ISREG(t) && tar_skip_regfile(t) != 0)
{ {
cmSystemTools::Error("Problem with tar_skip_regfile(): ", strerror(errno)); cmSystemTools::Error("Problem with tar_skip_regfile(): ",
strerror(errno));
return false; return false;
} }
} }

View File

@ -131,8 +131,10 @@ void cmTarget::TraceVSDependencies(std::string projFile,
makefile->GetSourceFileWithOutput(id->c_str()); makefile->GetSourceFileWithOutput(id->c_str());
// if a source file was found then add it // if a source file was found then add it
if (outsf && if (outsf &&
(std::find(classes.begin(),classes.end(),outsf) == classes.end()) && (std::find(classes.begin(),classes.end(),outsf) == classes.end())
(std::find(newClasses.begin(),newClasses.end(),outsf) == newClasses.end())) &&
(std::find(newClasses.begin(),newClasses.end(),outsf)
== newClasses.end()))
{ {
// then add the source to this target and add it to the queue // then add the source to this target and add it to the queue
newClasses.push_back(outsf); newClasses.push_back(outsf);
@ -169,7 +171,8 @@ void cmTarget::TraceVSDependencies(std::string projFile,
srcFilesQueued.insert(projFile); srcFilesQueued.insert(projFile);
} }
// add in the library depends for custom targets // add in the library depends for custom targets
if (this->GetType() == cmTarget::UTILITY || this->GetType() == cmTarget::GLOBAL_TARGET) if (this->GetType() == cmTarget::UTILITY ||
this->GetType() == cmTarget::GLOBAL_TARGET)
{ {
for (std::vector<cmCustomCommand>::iterator ic = for (std::vector<cmCustomCommand>::iterator ic =
this->GetPostBuildCommands().begin(); this->GetPostBuildCommands().begin();
@ -224,7 +227,8 @@ void cmTarget::TraceVSDependencies(std::string projFile,
dep = cmSystemTools::GetFilenameWithoutLastExtension(dep); dep = cmSystemTools::GetFilenameWithoutLastExtension(dep);
} }
// watch for target dependencies, // watch for target dependencies,
if(m_Makefile->GetLocalGenerator()->GetGlobalGenerator()->FindTarget(0, dep.c_str())) if(m_Makefile->GetLocalGenerator()->
GetGlobalGenerator()->FindTarget(0, dep.c_str()))
{ {
// add the depend as a utility on the target // add the depend as a utility on the target
this->AddUtility(dep.c_str()); this->AddUtility(dep.c_str());
@ -342,7 +346,8 @@ const std::vector<std::string>& cmTarget::GetLinkDirectories()
if(!m_LinkLibrariesAnalyzed && !m_LinkLibraries.empty()) if(!m_LinkLibrariesAnalyzed && !m_LinkLibraries.empty())
{ {
cmSystemTools::Error( cmSystemTools::Error(
"cmTarget::GetLinkDirectories called before cmTarget::AnalyzeLibDependencies on target ", "cmTarget::GetLinkDirectories called before "
"cmTarget::AnalyzeLibDependencies on target ",
m_Name.c_str()); m_Name.c_str());
} }
@ -420,7 +425,8 @@ void cmTarget::AddLinkLibrary(const std::string& lib,
LinkLibraryType llt) LinkLibraryType llt)
{ {
this->AddFramework(lib.c_str(), llt); this->AddFramework(lib.c_str(), llt);
m_LinkLibraries.push_back( std::pair<std::string, cmTarget::LinkLibraryType>(lib,llt) ); m_LinkLibraries.push_back( std::pair<std::string,
cmTarget::LinkLibraryType>(lib,llt) );
} }
bool cmTarget::AddFramework(const std::string& libname, LinkLibraryType llt) bool cmTarget::AddFramework(const std::string& libname, LinkLibraryType llt)
@ -452,7 +458,8 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
return; return;
} }
this->AddFramework(lib, llt); this->AddFramework(lib, llt);
m_LinkLibraries.push_back( std::pair<std::string, cmTarget::LinkLibraryType>(lib,llt) ); m_LinkLibraries.push_back( std::pair<std::string,
cmTarget::LinkLibraryType>(lib,llt) );
if(llt != cmTarget::GENERAL) if(llt != cmTarget::GENERAL)
{ {
@ -470,13 +477,16 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
if(!def || strcmp(def, "debug") == 0) if(!def || strcmp(def, "debug") == 0)
{ {
mf.AddCacheDefinition(linkTypeName.c_str(), mf.AddCacheDefinition(linkTypeName.c_str(),
"debug", "Library is used for debug links only", "debug",
"Library is used for debug links only",
cmCacheManager::STATIC); cmCacheManager::STATIC);
} }
else else
{ {
mf.AddCacheDefinition(linkTypeName.c_str(), mf.AddCacheDefinition(linkTypeName.c_str(),
"general", "Library is used for both debug and optimized links", "general",
"Library is used for both debug "
"and optimized links",
cmCacheManager::STATIC); cmCacheManager::STATIC);
} }
} }
@ -487,13 +497,15 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
if(!def || strcmp(def, "optimized") == 0) if(!def || strcmp(def, "optimized") == 0)
{ {
mf.AddCacheDefinition(linkTypeName.c_str(), mf.AddCacheDefinition(linkTypeName.c_str(),
"optimized", "Library is used for debug links only", "optimized", "Library is used for debug "
"links only",
cmCacheManager::STATIC); cmCacheManager::STATIC);
} }
else else
{ {
mf.AddCacheDefinition(linkTypeName.c_str(), mf.AddCacheDefinition(linkTypeName.c_str(),
"general", "Library is used for both debug and optimized links", "general", "Library is used for both debug "
"and optimized links",
cmCacheManager::STATIC); cmCacheManager::STATIC);
} }
} }
@ -651,7 +663,8 @@ cmTarget::AnalyzeLibDependencies( const cmMakefile& mf )
// 4. Add the new libraries to the link line. // 4. Add the new libraries to the link line.
// //
for( std::vector<std::string>::reverse_iterator k = newLinkLibraries.rbegin(); for( std::vector<std::string>::reverse_iterator k =
newLinkLibraries.rbegin();
k != newLinkLibraries.rend(); ++k ) k != newLinkLibraries.rend(); ++k )
{ {
std::string linkType = *k; std::string linkType = *k;
@ -694,7 +707,8 @@ void cmTarget::DeleteDependency( DependencyMap& depMap,
{ {
DependencyList& depList = map_itr->second; DependencyList& depList = map_itr->second;
DependencyList::iterator itr; DependencyList::iterator itr;
while( (itr = std::find(depList.begin(), depList.end(), dep)) != depList.end() ) while( (itr = std::find(depList.begin(), depList.end(), dep)) !=
depList.end() )
{ {
depList.erase( itr ); depList.erase( itr );
} }
@ -958,7 +972,8 @@ const char* cmTarget::GetLinkerLanguage(cmGlobalGenerator* gg)
} }
if(languages.size() == 1) if(languages.size() == 1)
{ {
const_cast<cmTarget*>(this)->SetProperty("LINKER_LANGUAGE", languages.begin()->c_str()); const_cast<cmTarget*>(this)->SetProperty("LINKER_LANGUAGE",
languages.begin()->c_str());
return this->GetProperty("LINKER_LANGUAGE"); return this->GetProperty("LINKER_LANGUAGE");
} }
const char* prefLang = 0; const char* prefLang = 0;

View File

@ -17,7 +17,8 @@
#include "cmTargetLinkLibrariesCommand.h" #include "cmTargetLinkLibrariesCommand.h"
// cmTargetLinkLibrariesCommand // cmTargetLinkLibrariesCommand
bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args) bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string>
const& args)
{ {
// must have one argument // must have one argument
if(args.size() < 1) if(args.size() < 1)
@ -55,7 +56,8 @@ bool cmTargetLinkLibrariesCommand::InitialPass(std::vector<std::string> const& a
++i; ++i;
if(i == args.end()) if(i == args.end())
{ {
this->SetError("The \"optimized\" argument must be followed by a library"); this->SetError(
"The \"optimized\" argument must be followed by a library");
return false; return false;
} }
m_Makefile->AddLinkLibraryForTarget(args[0].c_str(),i->c_str(), m_Makefile->AddLinkLibraryForTarget(args[0].c_str(),i->c_str(),

View File

@ -119,8 +119,9 @@ int cmTryCompileCommand::CoreTryCompileCode(
// do not allow recursive try Compiles // do not allow recursive try Compiles
if (!strcmp(binaryDirectory,mf->GetHomeOutputDirectory())) if (!strcmp(binaryDirectory,mf->GetHomeOutputDirectory()))
{ {
cmSystemTools::Error("Attempt at a recursive or nested TRY_COMPILE in directory ", cmSystemTools::Error(
binaryDirectory); "Attempt at a recursive or nested TRY_COMPILE in directory ",
binaryDirectory);
return -1; return -1;
} }
@ -201,7 +202,8 @@ int cmTryCompileCommand::CoreTryCompileCode(
} }
fprintf(fout, "ADD_EXECUTABLE(cmTryCompileExec \"%s\")\n",source.c_str()); fprintf(fout, "ADD_EXECUTABLE(cmTryCompileExec \"%s\")\n",source.c_str());
fprintf(fout, "TARGET_LINK_LIBRARIES(cmTryCompileExec ${LINK_LIBRARIES})\n"); fprintf(fout,
"TARGET_LINK_LIBRARIES(cmTryCompileExec ${LINK_LIBRARIES})\n");
fclose(fout); fclose(fout);
projectName = "CMAKE_TRY_COMPILE"; projectName = "CMAKE_TRY_COMPILE";
targetName = "cmTryCompileExec"; targetName = "cmTryCompileExec";
@ -279,7 +281,9 @@ void cmTryCompileCommand::CleanupFiles(const char* binDir)
std::string bdir = binDir; std::string bdir = binDir;
if(bdir.find("CMakeTmp") == std::string::npos) if(bdir.find("CMakeTmp") == std::string::npos)
{ {
cmSystemTools::Error("TRY_COMPILE attempt to remove -rf directory that does not contain CMakeTmp:", binDir); cmSystemTools::Error(
"TRY_COMPILE attempt to remove -rf directory that does not contain "
"CMakeTmp:", binDir);
return; return;
} }

View File

@ -56,7 +56,7 @@ bool cmTryRunCommand::InitialPass(std::vector<std::string> const& argv)
if ( argv.size() <= (i+1) ) if ( argv.size() <= (i+1) )
{ {
cmSystemTools::Error( cmSystemTools::Error(
"OUTPUT_VARIABLE specified but there is no variable"); "OUTPUT_VARIABLE specified but there is no variable");
return false; return false;
} }
outputVariable = argv[i+1]; outputVariable = argv[i+1];
@ -64,7 +64,8 @@ bool cmTryRunCommand::InitialPass(std::vector<std::string> const& argv)
} }
} }
// do the try compile // do the try compile
int res = cmTryCompileCommand::CoreTryCompileCode(m_Makefile, tryCompile, false); int res = cmTryCompileCommand::CoreTryCompileCode(m_Makefile, tryCompile,
false);
// now try running the command if it compiled // now try running the command if it compiled
std::string binaryDirectory = argv[2] + "/CMakeFiles/CMakeTmp"; std::string binaryDirectory = argv[2] + "/CMakeFiles/CMakeTmp";

View File

@ -94,7 +94,8 @@ CopyAndFullPathMesaHeader(const char* source,
// input file at the same time // input file at the same time
std::string inLine; std::string inLine;
// regular expression for any #include line // regular expression for any #include line
cmsys::RegularExpression includeLine("^[ \t]*#[ \t]*include[ \t]*[<\"]([^\">]+)[\">]"); cmsys::RegularExpression includeLine(
"^[ \t]*#[ \t]*include[ \t]*[<\"]([^\">]+)[\">]");
// regular expression for gl/ or GL/ in a file (match(1) of above) // regular expression for gl/ or GL/ in a file (match(1) of above)
cmsys::RegularExpression glDirLine("(gl|GL)(/|\\\\)([^<\"]+)"); cmsys::RegularExpression glDirLine("(gl|GL)(/|\\\\)([^<\"]+)");
// regular expression for gl GL or xmesa in a file (match(1) of above) // regular expression for gl GL or xmesa in a file (match(1) of above)
@ -111,7 +112,8 @@ CopyAndFullPathMesaHeader(const char* source,
} }
else if(glLine.find(includeFile.c_str())) else if(glLine.find(includeFile.c_str()))
{ {
fout << "#include \"" << outdir << "/" << includeLine.match(1).c_str() << "\"\n"; fout << "#include \"" << outdir << "/" <<
includeLine.match(1).c_str() << "\"\n";
} }
else else
{ {

View File

@ -67,7 +67,8 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args)
} }
// The source exists. // The source exists.
std::string cmakeCFGout = m_Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR"); std::string cmakeCFGout =
m_Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR");
std::string utilityDirectory = m_Makefile->GetCurrentOutputDirectory(); std::string utilityDirectory = m_Makefile->GetCurrentOutputDirectory();
std::string exePath; std::string exePath;
if (m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH")) if (m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"))

View File

@ -275,7 +275,8 @@ cmVTKMakeInstantiatorCommand
// Write the extern declarations for all the creation functions. // Write the extern declarations for all the creation functions.
for(unsigned int i=0;i < m_Classes.size();++i) for(unsigned int i=0;i < m_Classes.size();++i)
{ {
os << "extern vtkObject* vtkInstantiator" << m_Classes[i].c_str() << "New();\n"; os << "extern vtkObject* vtkInstantiator" << m_Classes[i].c_str()
<< "New();\n";
} }
// Write the ClassInitialize method to register all the creation functions. // Write the ClassInitialize method to register all the creation functions.
@ -405,7 +406,8 @@ cmVTKMakeInstantiatorCommand
os << os <<
"};\n" "};\n"
"\n" "\n"
"class " << m_ExportMacro.c_str() << " " << m_ClassName.c_str() << "Initialize\n" "class " << m_ExportMacro.c_str() << " " << m_ClassName.c_str()
<< "Initialize\n"
"{\n" "{\n"
"public:\n" "public:\n"
" " << m_ClassName.c_str() << "Initialize();\n" " " << m_ClassName.c_str() << "Initialize();\n"
@ -414,7 +416,8 @@ cmVTKMakeInstantiatorCommand
" static unsigned int Count;\n" " static unsigned int Count;\n"
"};\n" "};\n"
"\n" "\n"
"static " << m_ClassName.c_str() << "Initialize " << m_ClassName.c_str() << "Initializer;\n" "static " << m_ClassName.c_str() << "Initialize " << m_ClassName.c_str()
<< "Initializer;\n"
"\n" "\n"
"#endif\n"; "#endif\n";
} }
@ -460,13 +463,15 @@ cmVTKMakeInstantiatorCommand
os << os <<
"}\n" "}\n"
"\n" << "\n" <<
m_ClassName.c_str() << "Initialize::" << m_ClassName.c_str() << "Initialize()\n" m_ClassName.c_str() << "Initialize::" << m_ClassName.c_str()
<< "Initialize()\n"
"{\n" "{\n"
" if(++" << m_ClassName.c_str() << "Initialize::Count == 1)\n" " if(++" << m_ClassName.c_str() << "Initialize::Count == 1)\n"
" { " << m_ClassName.c_str() << "::ClassInitialize(); }\n" " { " << m_ClassName.c_str() << "::ClassInitialize(); }\n"
"}\n" "}\n"
"\n" << "\n" <<
m_ClassName.c_str() << "Initialize::~" << m_ClassName.c_str() << "Initialize()\n" m_ClassName.c_str() << "Initialize::~" << m_ClassName.c_str()
<< "Initialize()\n"
"{\n" "{\n"
" if(--" << m_ClassName.c_str() << "Initialize::Count == 0)\n" " if(--" << m_ClassName.c_str() << "Initialize::Count == 0)\n"
" { " << m_ClassName.c_str() << "::ClassFinalize(); }\n" " { " << m_ClassName.c_str() << "::ClassFinalize(); }\n"

View File

@ -49,7 +49,8 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
} }
// Prepare java dependency file // Prepare java dependency file
const char* resultDirectory = m_Makefile->GetRequiredDefinition("VTK_JAVA_HOME"); const char* resultDirectory =
m_Makefile->GetRequiredDefinition("VTK_JAVA_HOME");
std::string res = m_Makefile->GetCurrentOutputDirectory(); std::string res = m_Makefile->GetCurrentOutputDirectory();
std::string depFileName = res + "/JavaDependencies.cmake"; std::string depFileName = res + "/JavaDependencies.cmake";
std::ofstream depFile(depFileName.c_str()); std::ofstream depFile(depFileName.c_str());
@ -113,7 +114,8 @@ void cmVTKWrapJavaCommand::FinalPass()
const char* wjava = m_Makefile->GetRequiredDefinition("VTK_WRAP_JAVA_EXE"); const char* wjava = m_Makefile->GetRequiredDefinition("VTK_WRAP_JAVA_EXE");
const char* pjava = m_Makefile->GetRequiredDefinition("VTK_PARSE_JAVA_EXE"); const char* pjava = m_Makefile->GetRequiredDefinition("VTK_PARSE_JAVA_EXE");
const char* hints = m_Makefile->GetDefinition("VTK_WRAP_HINTS"); const char* hints = m_Makefile->GetDefinition("VTK_WRAP_HINTS");
const char* resultDirectory = m_Makefile->GetRequiredDefinition("VTK_JAVA_HOME"); const char* resultDirectory =
m_Makefile->GetRequiredDefinition("VTK_JAVA_HOME");
// wrap all the .h files // wrap all the .h files
depends.push_back(wjava); depends.push_back(wjava);
@ -143,7 +145,8 @@ void cmVTKWrapJavaCommand::FinalPass()
{ {
commandLineW.push_back(hints); commandLineW.push_back(hints);
} }
commandLineW.push_back((m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1")); commandLineW.push_back(
(m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1"));
commandLineW.push_back(res); commandLineW.push_back(res);
cmCustomCommandLines commandLines; cmCustomCommandLines commandLines;
@ -165,7 +168,8 @@ void cmVTKWrapJavaCommand::FinalPass()
{ {
commandLineP.push_back(hints); commandLineP.push_back(hints);
} }
commandLineP.push_back((m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1")); commandLineP.push_back(
(m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1"));
commandLineP.push_back(res2); commandLineP.push_back(res2);
cmCustomCommandLines commandLines2; cmCustomCommandLines commandLines2;

View File

@ -17,7 +17,8 @@
#include "cmVTKWrapPythonCommand.h" #include "cmVTKWrapPythonCommand.h"
// cmVTKWrapPythonCommand // cmVTKWrapPythonCommand
bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string> const& argsIn) bool cmVTKWrapPythonCommand::InitialPass(std::vector<std::string> const&
argsIn)
{ {
if(argsIn.size() < 3 ) if(argsIn.size() < 3 )
{ {
@ -102,7 +103,8 @@ void cmVTKWrapPythonCommand::FinalPass()
// first we add the rules for all the .h to Python.cxx files // first we add the rules for all the .h to Python.cxx files
size_t lastClass = m_WrapClasses.size(); size_t lastClass = m_WrapClasses.size();
std::vector<std::string> depends; std::vector<std::string> depends;
const char* wpython = m_Makefile->GetRequiredDefinition("VTK_WRAP_PYTHON_EXE"); const char* wpython = m_Makefile->
GetRequiredDefinition("VTK_WRAP_PYTHON_EXE");
const char* hints = m_Makefile->GetDefinition("VTK_WRAP_HINTS"); const char* hints = m_Makefile->GetDefinition("VTK_WRAP_HINTS");
// wrap all the .h files // wrap all the .h files
@ -124,7 +126,8 @@ void cmVTKWrapPythonCommand::FinalPass()
{ {
commandLine.push_back(hints); commandLine.push_back(hints);
} }
commandLine.push_back((m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1")); commandLine.push_back(
(m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1"));
commandLine.push_back(res); commandLine.push_back(res);
cmCustomCommandLines commandLines; cmCustomCommandLines commandLines;
@ -193,9 +196,11 @@ bool cmVTKWrapPythonCommand::WriteInit(const char *kitName,
for (i = 0; i < classes.size(); i++) for (i = 0; i < classes.size(); i++)
{ {
#ifdef _WIN32 #ifdef _WIN32
fprintf(fout,"extern \"C\" {__declspec( dllexport) PyObject *PyVTKClass_%sNew(char *); }\n",classes[i].c_str()); fprintf(fout,
"extern \"C\" {__declspec( dllexport) PyObject *PyVTKClass_%sNew(char *); }\n",classes[i].c_str());
#else #else
fprintf(fout,"extern \"C\" {PyObject *PyVTKClass_%sNew(char *); }\n",classes[i].c_str()); fprintf(fout,"extern \"C\" {PyObject *PyVTKClass_%sNew(char *); }\n",
classes[i].c_str());
#endif #endif
} }
@ -204,7 +209,8 @@ bool cmVTKWrapPythonCommand::WriteInit(const char *kitName,
fprintf(fout,"{NULL, NULL, 0, NULL}};\n\n"); fprintf(fout,"{NULL, NULL, 0, NULL}};\n\n");
#ifdef _WIN32 #ifdef _WIN32
fprintf(fout,"extern \"C\" {__declspec( dllexport) void init%s();}\n\n",kitName); fprintf(fout,"extern \"C\" {__declspec( dllexport) void init%s();}\n\n",
kitName);
fprintf(fout,"void init%s()\n{\n",kitName); fprintf(fout,"void init%s()\n{\n",kitName);
#else #else
fprintf(fout,"extern \"C\" {void initlib%s();}\n\n",kitName); fprintf(fout,"extern \"C\" {void initlib%s();}\n\n",kitName);

View File

@ -163,7 +163,8 @@ void cmVTKWrapTclCommand::FinalPass()
{ {
commandLine.push_back(hints); commandLine.push_back(hints);
} }
commandLine.push_back((m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1")); commandLine.push_back(
(m_WrapClasses[classNum].GetPropertyAsBool("ABSTRACT") ? "0" : "1"));
std::string res = m_Makefile->GetCurrentOutputDirectory(); std::string res = m_Makefile->GetCurrentOutputDirectory();
res += "/"; res += "/";
res += m_WrapClasses[classNum].GetSourceName() + ".cxx"; res += m_WrapClasses[classNum].GetSourceName() + ".cxx";
@ -225,7 +226,8 @@ bool cmVTKWrapTclCommand::WriteInit(const char *kitName,
FILE *fout = fopen(tempOutputFile.c_str(),"w"); FILE *fout = fopen(tempOutputFile.c_str(),"w");
if (!fout) if (!fout)
{ {
cmSystemTools::Error("Failed to open TclInit file for ", tempOutputFile.c_str()); cmSystemTools::Error("Failed to open TclInit file for ",
tempOutputFile.c_str());
cmSystemTools::ReportLastSystemError(""); cmSystemTools::ReportLastSystemError("");
return false; return false;
} }

View File

@ -18,7 +18,8 @@
#include "cmCacheManager.h" #include "cmCacheManager.h"
// cmLibraryCommand // cmLibraryCommand
bool cmVariableRequiresCommand::InitialPass(std::vector<std::string> const& args) bool cmVariableRequiresCommand::InitialPass(std::vector<std::string>const&
args)
{ {
if(args.size() < 3 ) if(args.size() < 3 )
{ {
@ -62,13 +63,16 @@ bool cmVariableRequiresCommand::InitialPass(std::vector<std::string> const& args
if(!requirementsMet) if(!requirementsMet)
{ {
std::string message = "Variable assertion failed:\n"; std::string message = "Variable assertion failed:\n";
message += testVariable + " Requires that the following unset variables are set:\n"; message += testVariable +
" Requires that the following unset variables are set:\n";
message += notSet; message += notSet;
message += "\nPlease set them, or set "; message += "\nPlease set them, or set ";
message += testVariable + " to false, and re-configure.\n"; message += testVariable + " to false, and re-configure.\n";
if(hasAdvanced) if(hasAdvanced)
{ {
message += "One or more of the required variables is advanced. To set the variable, you must turn on advanced mode in cmake."; message +=
"One or more of the required variables is advanced."
" To set the variable, you must turn on advanced mode in cmake.";
} }
cmSystemTools::Error(message.c_str()); cmSystemTools::Error(message.c_str());
} }

View File

@ -44,7 +44,8 @@ void cmVariableWatch::AddWatch(const std::string& variable,
vp->push_back(p); vp->push_back(p);
} }
void cmVariableWatch::RemoveWatch(const std::string& variable, WatchMethod method) void cmVariableWatch::RemoveWatch(const std::string& variable,
WatchMethod method)
{ {
cmVariableWatch::VectorOfPairs* vp = &m_WatchMap[variable]; cmVariableWatch::VectorOfPairs* vp = &m_WatchMap[variable];
cmVariableWatch::VectorOfPairs::iterator it; cmVariableWatch::VectorOfPairs::iterator it;
@ -58,9 +59,11 @@ void cmVariableWatch::RemoveWatch(const std::string& variable, WatchMethod metho
} }
} }
void cmVariableWatch::VariableAccessed(const std::string& variable, int access_type) const void cmVariableWatch::VariableAccessed(const std::string& variable,
int access_type) const
{ {
cmVariableWatch::StringToVectorOfPairs::const_iterator mit = m_WatchMap.find(variable); cmVariableWatch::StringToVectorOfPairs::const_iterator mit =
m_WatchMap.find(variable);
if ( mit != m_WatchMap.end() ) if ( mit != m_WatchMap.end() )
{ {
const cmVariableWatch::VectorOfPairs* vp = &mit->second; const cmVariableWatch::VectorOfPairs* vp = &mit->second;

View File

@ -36,7 +36,8 @@ public:
/** /**
* Add watch to the variable * Add watch to the variable
*/ */
void AddWatch(const std::string& variable, WatchMethod method, void* client_data=0); void AddWatch(const std::string& variable, WatchMethod method,
void* client_data=0);
void RemoveWatch(const std::string& variable, WatchMethod method); void RemoveWatch(const std::string& variable, WatchMethod method);
/** /**

View File

@ -77,8 +77,10 @@ ShouldRemove(const cmListFileFunction& lff, cmMakefile& )
void cmWhileFunctionBlocker:: void cmWhileFunctionBlocker::
ScopeEnded(cmMakefile &mf) ScopeEnded(cmMakefile &mf)
{ {
cmSystemTools::Error("The end of a CMakeLists file was reached with a WHILE statement that was not closed properly. Within the directory: ", cmSystemTools::Error(
mf.GetCurrentDirectory()); "The end of a CMakeLists file was reached with a WHILE statement that "
"was not closed properly. Within the directory: ",
mf.GetCurrentDirectory());
} }
bool cmWhileCommand::InvokeInitialPass( bool cmWhileCommand::InvokeInitialPass(

View File

@ -106,7 +106,8 @@ inline bool IsWinNT()
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bool cmWin32ProcessExecution::BorlandRunCommand( bool cmWin32ProcessExecution::BorlandRunCommand(
const char* command, const char* dir, const char* command, const char* dir,
std::string& output, int& retVal, bool verbose, int /* timeout */, bool hideWindows) std::string& output, int& retVal, bool verbose, int /* timeout */,
bool hideWindows)
{ {
//verbose = true; //verbose = true;
//std::cerr << std::endl //std::cerr << std::endl

View File

@ -25,7 +25,8 @@ void cmXCode21Object::PrintComment(std::ostream& out)
} }
void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v, std::ostream& out, PBXType t) void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
std::ostream& out, PBXType t)
{ {
bool hasOne = false; bool hasOne = false;
for(std::vector<cmXCodeObject*>::const_iterator i = v.begin(); for(std::vector<cmXCodeObject*>::const_iterator i = v.begin();
@ -55,7 +56,8 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v, std::ostre
out << "/* End " << PBXTypeNames[t] << " section */\n"; out << "/* End " << PBXTypeNames[t] << " section */\n";
} }
void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v, std::ostream& out) void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
std::ostream& out)
{ {
cmXCodeObject::Indent(1, out); cmXCodeObject::Indent(1, out);
out << "objects = {\n"; out << "objects = {\n";
@ -69,11 +71,13 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v, std::ostre
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXHeadersBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXHeadersBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXNativeTarget); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXNativeTarget);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXProject); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXProject);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXShellScriptBuildPhase); cmXCode21Object::PrintList(v, out,
cmXCode21Object::PBXShellScriptBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXResourcesBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXResourcesBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXSourcesBuildPhase); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXSourcesBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXApplicationReference); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXApplicationReference);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXExecutableFileReference); cmXCode21Object::PrintList(v, out,
cmXCode21Object::PBXExecutableFileReference);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryReference); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryReference);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXToolTarget); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXToolTarget);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryTarget); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryTarget);

View File

@ -8,7 +8,8 @@ const char* cmXCodeObject::PBXTypeNames[] = {
"PBXTargetDependency", "PBXShellScriptBuildPhase", "PBXTargetDependency", "PBXShellScriptBuildPhase",
"PBXResourcesBuildPhase", "PBXApplicationReference", "PBXResourcesBuildPhase", "PBXApplicationReference",
"PBXExecutableFileReference", "PBXLibraryReference", "PBXToolTarget", "PBXExecutableFileReference", "PBXLibraryReference", "PBXToolTarget",
"PBXLibraryTarget", "PBXAggregateTarget", "XCBuildConfiguration", "XCConfigurationList", "PBXLibraryTarget", "PBXAggregateTarget", "XCBuildConfiguration",
"XCConfigurationList",
"None" "None"
}; };
@ -118,7 +119,8 @@ void cmXCodeObject::Print(std::ostream& out)
{ {
std::map<cmStdString, cmXCodeObject*>::iterator j; std::map<cmStdString, cmXCodeObject*>::iterator j;
out << i->first << " = {" << separator; out << i->first << " = {" << separator;
for(j = object->m_ObjectAttributes.begin(); j != object->m_ObjectAttributes.end(); ++j) for(j = object->m_ObjectAttributes.begin(); j !=
object->m_ObjectAttributes.end(); ++j)
{ {
cmXCodeObject::Indent(4 *indentFactor, out); cmXCodeObject::Indent(4 *indentFactor, out);
out << j->first << " = " << j->second->m_String << ";"; out << j->first << " = " << j->second->m_String << ";";

View File

@ -76,7 +76,8 @@ static const cmDocumentationEntry cmDocumentationOptions[] =
"Only load the cache. Do not actually run configure and generate steps."}, "Only load the cache. Do not actually run configure and generate steps."},
{"-P <file>", "Process script mode.", {"-P <file>", "Process script mode.",
"Process the given cmake file as a script written in the CMake language. " "Process the given cmake file as a script written in the CMake language. "
"No configure or generate step is performed and the cache is not modified."}, "No configure or generate step is performed and the cache is not"
" modified."},
{"--help-command cmd [file]", "Print help for a single command and exit.", {"--help-command cmd [file]", "Print help for a single command and exit.",
"Full documentation specific to the given command is displayed."}, "Full documentation specific to the given command is displayed."},
{"--help-command-list [file]", "List available listfile commands and exit.", {"--help-command-list [file]", "List available listfile commands and exit.",
@ -133,7 +134,8 @@ int do_cmake(int ac, char** av)
if ( cmSystemTools::GetCurrentWorkingDirectory().size() == 0 ) if ( cmSystemTools::GetCurrentWorkingDirectory().size() == 0 )
{ {
std::cerr << "Current working directory cannot be established." << std::endl; std::cerr << "Current working directory cannot be established."
<< std::endl;
nocwd = 1; nocwd = 1;
} }
@ -173,7 +175,9 @@ int do_cmake(int ac, char** av)
#else #else
if ( nocwd || ac == 1 ) if ( nocwd || ac == 1 )
{ {
std::cout << "Bootstrap CMake should not be used outside CMake build process." << std::endl; std::cout <<
"Bootstrap CMake should not be used outside CMake build process."
<< std::endl;
return 0; return 0;
} }
#endif #endif
@ -253,7 +257,8 @@ int do_cmake(int ac, char** av)
int res = cm.Run(args, view_only); int res = cm.Run(args, view_only);
if ( list_cached || list_all_cached ) if ( list_cached || list_all_cached )
{ {
cmCacheManager::CacheIterator it = cm.GetCacheManager()->GetCacheIterator(); cmCacheManager::CacheIterator it =
cm.GetCacheManager()->GetCacheIterator();
std::cout << "-- Cache values" << std::endl; std::cout << "-- Cache values" << std::endl;
for ( it.Begin(); !it.IsAtEnd(); it.Next() ) for ( it.Begin(); !it.IsAtEnd(); it.Next() )
{ {
@ -268,7 +273,8 @@ int do_cmake(int ac, char** av)
{ {
std::cout << "// " << it.GetProperty("HELPSTRING") << std::endl; std::cout << "// " << it.GetProperty("HELPSTRING") << std::endl;
} }
std::cout << it.GetName() << ":" << cmCacheManager::TypeToString(it.GetType()) std::cout << it.GetName() << ":" <<
cmCacheManager::TypeToString(it.GetType())
<< "=" << it.GetValue() << std::endl; << "=" << it.GetValue() << std::endl;
if ( list_help ) if ( list_help )
{ {