1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmMakefile.h,v $
6 Date: $Date: 2008-03-07 13:40:36 $
7 Version: $Revision: 1.228 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
20 #include "cmCacheManager.h"
22 #include "cmExecutionStatus.h"
23 #include "cmListFileCache.h"
24 #include "cmPolicies.h"
25 #include "cmPropertyMap.h"
26 #include "cmSystemTools.h"
29 #if defined(CMAKE_BUILD_WITH_CMAKE)
30 #include "cmSourceGroup.h"
33 #include <cmsys/RegularExpression.hxx>
35 class cmFunctionBlocker
;
37 class cmInstallGenerator
;
38 class cmLocalGenerator
;
42 class cmVariableWatch
;
47 * \brief Process the input CMakeLists.txt file.
49 * Process and store into memory the input CMakeLists.txt file.
50 * Each CMakeLists.txt file is parsed and the commands found there
51 * are added into the build process.
57 * Return the major and minor version of the cmake that
58 * was used to write the currently loaded cache, note
59 * this method will not work before the cache is loaded.
61 unsigned int GetCacheMajorVersion();
62 unsigned int GetCacheMinorVersion();
64 /** Return whether compatibility features needed for a version of
65 the cache or lower should be enabled. */
66 bool NeedCacheCompatibility(int major
, int minor
);
69 * Construct an empty makefile.
72 cmMakefile(const cmMakefile
& mf
);
80 * Read and parse a CMakeLists.txt file.
82 bool ReadListFile(const char* listfile
,
83 const char* external
= 0,
84 std::string
* fullPath
= 0);
87 * Add a function blocker to this makefile
89 void AddFunctionBlocker(cmFunctionBlocker
*fb
)
90 { this->FunctionBlockers
.push_back(fb
);}
91 void RemoveFunctionBlocker(cmFunctionBlocker
*fb
)
92 { this->FunctionBlockers
.remove(fb
);}
93 void RemoveFunctionBlocker(const cmListFileFunction
& lff
);
96 * Add file to the written file list. These file should not be in the list
97 * of dependencies because they cause infinite loops.
99 void AddWrittenFile(const char* file
);
100 bool HasWrittenFile(const char* file
);
103 * Check if there are any infinite loops
105 bool CheckInfiniteLoops();
108 * Try running cmake and building a file. This is used for dynalically
109 * loaded commands, not as part of the usual build process.
111 int TryCompile(const char *srcdir
, const char *bindir
,
112 const char *projectName
, const char *targetName
,
113 const std::vector
<std::string
> *cmakeArgs
,
114 std::string
*output
);
117 * Specify the makefile generator. This is platform/compiler
118 * dependent, although the interface is through a generic
121 void SetLocalGenerator(cmLocalGenerator
*);
123 ///! Get the current makefile generator.
124 cmLocalGenerator
* GetLocalGenerator()
125 { return this->LocalGenerator
;}
128 * Test whether compatibility is set to a given version or lower.
130 bool NeedBackwardsCompatibility(unsigned int major
,
132 unsigned int patch
= 0xFFu
);
135 * Help enforce global target name uniqueness.
137 bool EnforceUniqueName(std::string
const& name
, std::string
& msg
,
138 bool isCustom
= false);
141 * Perform FinalPass, Library dependency analysis etc before output of the
144 void ConfigureFinalPass();
147 * run the final pass on all commands.
152 * Print the object state to std::cout.
156 /** Add a custom command to the build. */
157 void AddCustomCommandToTarget(const char* target
,
158 const std::vector
<std::string
>& depends
,
159 const cmCustomCommandLines
& commandLines
,
160 cmTarget::CustomCommandType type
,
161 const char* comment
, const char* workingDir
,
162 bool escapeOldStyle
= true);
163 void AddCustomCommandToOutput(const std::vector
<std::string
>& outputs
,
164 const std::vector
<std::string
>& depends
,
165 const char* main_dependency
,
166 const cmCustomCommandLines
& commandLines
,
167 const char* comment
, const char* workingDir
,
168 bool replace
= false,
169 bool escapeOldStyle
= true);
170 void AddCustomCommandToOutput(const char* output
,
171 const std::vector
<std::string
>& depends
,
172 const char* main_dependency
,
173 const cmCustomCommandLines
& commandLines
,
174 const char* comment
, const char* workingDir
,
175 bool replace
= false,
176 bool escapeOldStyle
= true);
177 void AddCustomCommandOldStyle(const char* target
,
178 const std::vector
<std::string
>& outputs
,
179 const std::vector
<std::string
>& depends
,
181 const cmCustomCommandLines
& commandLines
,
182 const char* comment
);
185 * Add a define flag to the build.
187 void AddDefineFlag(const char* definition
);
188 void RemoveDefineFlag(const char* definition
);
190 /** Create a new imported target with the name and type given. */
191 cmTarget
* AddImportedTarget(const char* name
, cmTarget::TargetType type
);
193 cmTarget
* AddNewTarget(cmTarget::TargetType type
, const char* name
);
196 * Add an executable to the build.
198 cmTarget
* AddExecutable(const char *exename
,
199 const std::vector
<std::string
> &srcs
,
200 bool excludeFromAll
= false);
203 * Add a utility to the build. A utiltity target is a command that
204 * is run every time the target is built.
206 void AddUtilityCommand(const char* utilityName
, bool excludeFromAll
,
207 const std::vector
<std::string
>& depends
,
208 const char* workingDirectory
,
214 void AddUtilityCommand(const char* utilityName
, bool excludeFromAll
,
215 const char* workingDirectory
,
216 const std::vector
<std::string
>& depends
,
217 const cmCustomCommandLines
& commandLines
,
218 bool escapeOldStyle
= true,
219 const char* comment
= 0);
222 * Add a link library to the build.
224 void AddLinkLibrary(const char*);
225 void AddLinkLibrary(const char*, cmTarget::LinkLibraryType type
);
226 void AddLinkLibraryForTarget(const char *tgt
, const char*,
227 cmTarget::LinkLibraryType type
);
228 void AddLinkDirectoryForTarget(const char *tgt
, const char* d
);
231 * Add a link directory to the build.
233 void AddLinkDirectory(const char*);
236 * Get the list of link directories
238 std::vector
<std::string
>& GetLinkDirectories()
240 return this->LinkDirectories
;
242 const std::vector
<std::string
>& GetLinkDirectories() const
244 return this->LinkDirectories
;
246 void SetLinkDirectories(const std::vector
<std::string
>& vec
)
248 this->LinkDirectories
= vec
;
252 * Add a subdirectory to the build.
254 void AddSubDirectory(const char*, bool excludeFromAll
=false,
255 bool preorder
= false);
256 void AddSubDirectory(const char* fullSrcDir
,const char *fullBinDir
,
257 bool excludeFromAll
, bool preorder
,
261 * Configure a subdirectory
263 void ConfigureSubDirectory(cmLocalGenerator
*);
266 * Add an include directory to the build.
268 void AddIncludeDirectory(const char*, bool before
= false);
271 * Add a variable definition to the build. This variable
272 * can be used in CMake to refer to lists, directories, etc.
274 void AddDefinition(const char* name
, const char* value
);
275 ///! Add a definition to this makefile and the global cmake cache.
276 void AddCacheDefinition(const char* name
, const char* value
,
278 cmCacheManager::CacheEntryType type
);
281 * Add bool variable definition to the build.
283 void AddDefinition(const char* name
, bool);
284 ///! Add a definition to this makefile and the global cmake cache.
285 void AddCacheDefinition(const char* name
, bool, const char* doc
);
288 * Remove a variable definition from the build. This is not valid
289 * for cache entries, and will only affect the current makefile.
291 void RemoveDefinition(const char* name
);
294 * Specify the name of the project for this build.
296 void SetProjectName(const char*);
299 * Get the name of the project for this build.
301 const char* GetProjectName() const
303 return this->ProjectName
.c_str();
307 * Set the name of the library.
309 void AddLibrary(const char *libname
, cmTarget::TargetType type
,
310 const std::vector
<std::string
> &srcs
,
311 bool excludeFromAll
= false);
313 #if defined(CMAKE_BUILD_WITH_CMAKE)
315 * Add a root source group for consideration when adding a new source.
317 void AddSourceGroup(const char* name
, const char* regex
=0);
320 * Add a source group for consideration when adding a new source.
323 void AddSourceGroup(const std::vector
<std::string
>& name
,
324 const char* regex
=0);
330 * Set, Push, Pop policy values for CMake.
332 bool SetPolicy(cmPolicies::PolicyID id
, cmPolicies::PolicyStatus status
);
333 bool SetPolicy(const char *id
, cmPolicies::PolicyStatus status
);
334 cmPolicies::PolicyStatus
GetPolicyStatus(cmPolicies::PolicyID id
);
336 bool PopPolicy(bool reportError
= true);
337 bool SetPolicyVersion(const char *version
);
341 * Get the Policies Instance
343 cmPolicies
*GetPolicies();
346 * Add an auxiliary directory to the build.
348 void AddExtraDirectory(const char* dir
);
352 * Add an auxiliary directory to the build.
354 void MakeStartDirectoriesCurrent()
356 this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
357 this->cmStartDirectory
.c_str());
358 this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
359 this->StartOutputDirectory
.c_str());
364 * Set/Get the home directory (or output directory) in the project. The
365 * home directory is the top directory of the project. It is where
366 * CMakeSetup or configure was run. Remember that CMake processes
367 * CMakeLists files by recursing up the tree starting at the StartDirectory
368 * and going up until it reaches the HomeDirectory.
370 void SetHomeDirectory(const char* dir
);
371 const char* GetHomeDirectory() const
373 return this->cmHomeDirectory
.c_str();
375 void SetHomeOutputDirectory(const char* lib
);
376 const char* GetHomeOutputDirectory() const
378 return this->HomeOutputDirectory
.c_str();
384 * Set/Get the start directory (or output directory). The start directory
385 * is the directory of the CMakeLists.txt file that started the current
386 * round of processing. Remember that CMake processes CMakeLists files by
387 * recursing up the tree starting at the StartDirectory and going up until
388 * it reaches the HomeDirectory.
390 void SetStartDirectory(const char* dir
)
392 this->cmStartDirectory
= dir
;
393 cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory
);
394 this->cmStartDirectory
=
395 cmSystemTools::CollapseFullPath(this->cmStartDirectory
.c_str());
396 this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
397 this->cmStartDirectory
.c_str());
399 const char* GetStartDirectory() const
401 return this->cmStartDirectory
.c_str();
403 void SetStartOutputDirectory(const char* lib
)
405 this->StartOutputDirectory
= lib
;
406 cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory
);
407 this->StartOutputDirectory
=
408 cmSystemTools::CollapseFullPath(this->StartOutputDirectory
.c_str());
409 cmSystemTools::MakeDirectory(this->StartOutputDirectory
.c_str());
410 this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
411 this->StartOutputDirectory
.c_str());
413 const char* GetStartOutputDirectory() const
415 return this->StartOutputDirectory
.c_str();
419 const char* GetCurrentDirectory() const
421 return this->cmStartDirectory
.c_str();
423 const char* GetCurrentOutputDirectory() const
425 return this->StartOutputDirectory
.c_str();
428 /* Get the current CMakeLists.txt file that is being processed. This
429 * is just used in order to be able to 'branch' from one file to a second
431 const char* GetCurrentListFile() const
433 return this->cmCurrentListFile
.c_str();
439 * Set a regular expression that include files must match
440 * in order to be considered as part of the depend information.
442 void SetIncludeRegularExpression(const char* regex
)
444 this->IncludeFileRegularExpression
= regex
;
446 const char* GetIncludeRegularExpression()
448 return this->IncludeFileRegularExpression
.c_str();
452 * Set a regular expression that include files that are not found
453 * must match in order to be considered a problem.
455 void SetComplainRegularExpression(const char* regex
)
457 this->ComplainFileRegularExpression
= regex
;
459 const char* GetComplainRegularExpression()
461 return this->ComplainFileRegularExpression
.c_str();
465 * Get the list of targets
467 cmTargets
&GetTargets() { return this->Targets
; }
469 * Get the list of targets, const version
471 const cmTargets
&GetTargets() const { return this->Targets
; }
473 cmTarget
* FindTarget(const char* name
);
475 /** Find a target to use in place of the given name. The target
476 returned may be imported or built within the project. */
477 cmTarget
* FindTargetToUse(const char* name
);
480 * Get a list of include directories in the build.
482 std::vector
<std::string
>& GetIncludeDirectories()
484 return this->IncludeDirectories
;
486 const std::vector
<std::string
>& GetIncludeDirectories() const
488 return this->IncludeDirectories
;
490 void SetIncludeDirectories(const std::vector
<std::string
>& vec
)
492 this->IncludeDirectories
= vec
;
496 * Mark include directories as system directories.
498 void AddSystemIncludeDirectory(const char* dir
);
499 bool IsSystemIncludeDirectory(const char* dir
);
501 /** Expand out any arguements in the vector that have ; separated
502 * strings into multiple arguements. A new vector is created
503 * containing the expanded versions of all arguments in argsIn.
504 * This method differes from the one in cmSystemTools in that if
505 * the CmakeLists file is version 1.2 or earlier it will check for
506 * source lists being used without ${} around them
508 void ExpandSourceListArguments(std::vector
<std::string
> const& argsIn
,
509 std::vector
<std::string
>& argsOut
,
510 unsigned int startArgumentIndex
);
512 /** Get a cmSourceFile pointer for a given source name, if the name is
513 * not found, then a null pointer is returned.
515 cmSourceFile
* GetSource(const char* sourceName
);
517 /** Get a cmSourceFile pointer for a given source name, if the name is
518 * not found, then create the source file and return it. generated
519 * indicates if it is a generated file, this is used in determining
520 * how to create the source file instance e.g. name
522 cmSourceFile
* GetOrCreateSource(const char* sourceName
,
523 bool generated
= false);
526 * Obtain a list of auxiliary source directories.
528 std::vector
<std::string
>& GetAuxSourceDirectories()
529 {return this->AuxSourceDirectories
;}
533 * Return a list of extensions associated with source and header
536 const std::vector
<std::string
>& GetSourceExtensions() const
537 {return this->SourceFileExtensions
;}
538 const std::vector
<std::string
>& GetHeaderExtensions() const
539 {return this->HeaderFileExtensions
;}
543 * Given a variable name, return its value (as a string).
544 * If the variable is not found in this makefile instance, the
545 * cache is then queried.
547 const char* GetDefinition(const char*) const;
548 const char* GetSafeDefinition(const char*) const;
549 const char* GetRequiredDefinition(const char* name
) const;
550 bool IsDefinitionSet(const char*) const;
552 * Get the list of all variables in the current space. If argument
553 * cacheonly is specified and is greater than 0, then only cache
554 * variables will be listed.
556 std::vector
<std::string
> GetDefinitions(int cacheonly
=0) const;
558 /** Test a boolean cache entry to see if it is true or false,
559 * returns false if no entry defined.
561 bool IsOn(const char* name
) const;
562 bool IsSet(const char* name
) const;
565 * Get a list of preprocessor define flags.
567 const char* GetDefineFlags()
568 {return this->DefineFlags
.c_str();}
571 * Make sure CMake can write this file
573 bool CanIWriteThisFile(const char* fileName
);
576 * Get the vector of used command instances.
578 const std::vector
<cmCommand
*>& GetUsedCommands() const
579 {return this->UsedCommands
;}
581 #if defined(CMAKE_BUILD_WITH_CMAKE)
583 * Get the vector source groups.
585 const std::vector
<cmSourceGroup
>& GetSourceGroups() const
586 { return this->SourceGroups
; }
589 * Get the source group
591 cmSourceGroup
* GetSourceGroup(const std::vector
<std::string
>&name
);
595 * Get the vector of list files on which this makefile depends
597 const std::vector
<std::string
>& GetListFiles() const
598 { return this->ListFiles
; }
599 ///! When the file changes cmake will be re-run from the build system.
600 void AddCMakeDependFile(const char* file
)
601 { this->ListFiles
.push_back(file
);}
604 * Get the list file stack as a string
606 std::string
GetListFileStack();
609 * Get the vector of files created by this makefile
611 const std::vector
<std::string
>& GetOutputFiles() const
612 { return this->OutputFiles
; }
613 void AddCMakeOutputFile(const char* file
)
614 { this->OutputFiles
.push_back(file
);}
617 * Expand all defined variables in the string.
618 * Defined variables come from the this->Definitions map.
619 * They are expanded with ${var} where var is the
620 * entry in the this->Definitions map. Also @var@ is
621 * expanded to match autoconf style expansions.
623 const char *ExpandVariablesInString(std::string
& source
);
624 const char *ExpandVariablesInString(std::string
& source
, bool escapeQuotes
,
627 const char* filename
= 0,
629 bool removeEmpty
= false,
630 bool replaceAt
= true);
633 * Remove any remaining variables in the string. Anything with ${var} or
634 * @var@ will be removed.
636 void RemoveVariablesInString(std::string
& source
,
637 bool atOnly
= false) const;
640 * Expand variables in the makefiles ivars such as link directories etc
642 void ExpandVariables();
645 * Replace variables and #cmakedefine lines in the given string.
646 * See cmConfigureFileCommand for details.
648 void ConfigureString(const std::string
& input
, std::string
& output
,
649 bool atOnly
, bool escapeQuotes
);
652 * Copy file but change lines acording to ConfigureString
654 int ConfigureFile(const char* infile
, const char* outfile
,
655 bool copyonly
, bool atOnly
, bool escapeQuotes
);
657 #if defined(CMAKE_BUILD_WITH_CMAKE)
659 * find what source group this source is in
661 cmSourceGroup
& FindSourceGroup(const char* source
,
662 std::vector
<cmSourceGroup
> &groups
);
665 void RegisterData(cmData
*);
666 void RegisterData(const char*, cmData
*);
667 cmData
* LookupData(const char*) const;
670 * Execute a single CMake command. Returns true if the command
671 * succeeded or false if it failed.
673 bool ExecuteCommand(const cmListFileFunction
& lff
,
674 cmExecutionStatus
&status
);
676 /** Check if a command exists. */
677 bool CommandExists(const char* name
) const;
680 * Add a command to this cmake instance
682 void AddCommand(cmCommand
* );
684 ///! Enable support for named language, if nil then all languages are
686 void EnableLanguage(std::vector
<std::string
>const& languages
, bool optional
);
689 * Set/Get the name of the parent directories CMakeLists file
690 * given a current CMakeLists file name
692 cmCacheManager
*GetCacheManager() const;
695 * Get the variable watch. This is used to determine when certain variables
698 #ifdef CMAKE_BUILD_WITH_CMAKE
699 cmVariableWatch
* GetVariableWatch() const;
702 ///! Display progress or status message.
703 void DisplayStatus(const char*, float);
706 * Expand the given list file arguments into the full set after
707 * variable replacement and list expansion.
709 void ExpandArguments(std::vector
<cmListFileArgument
> const& inArgs
,
710 std::vector
<std::string
>& outArgs
);
714 cmake
*GetCMakeInstance() const;
717 * Get all the source files this makefile knows about
719 const std::vector
<cmSourceFile
*> &GetSourceFiles() const
720 {return this->SourceFiles
;}
721 std::vector
<cmSourceFile
*> &GetSourceFiles() {return this->SourceFiles
;}
724 * Is there a source file that has the provided source file as an output?
725 * if so then return it
727 cmSourceFile
*GetSourceFileWithOutput(const char *outName
);
730 * Add a macro to the list of macros. The arguments should be name of the
731 * macro and a documentation signature of it
733 void AddMacro(const char* name
, const char* signature
);
735 ///! Add a new cmTest to the list of tests for this makefile.
736 cmTest
* CreateTest(const char* testName
);
738 /** Get a cmTest pointer for a given test name, if the name is
739 * not found, then a null pointer is returned.
741 cmTest
* GetTest(const char* testName
) const;
742 const std::vector
<cmTest
*> *GetTests() const;
743 std::vector
<cmTest
*> *GetTests();
746 * Get a list of macros as a ; separated string
748 void GetListOfMacros(std::string
& macros
);
751 * Return a location of a file in cmake or custom modules directory
753 std::string
GetModulesFile(const char* name
);
755 ///! Set/Get a property of this directory
756 void SetProperty(const char *prop
, const char *value
);
757 void AppendProperty(const char *prop
, const char *value
);
758 const char *GetProperty(const char *prop
);
759 const char *GetPropertyOrDefinition(const char *prop
);
760 const char *GetProperty(const char *prop
, cmProperty::ScopeType scope
);
761 bool GetPropertyAsBool(const char *prop
);
763 // Get the properties
764 cmPropertyMap
&GetProperties() { return this->Properties
; };
766 typedef std::map
<cmStdString
, cmStdString
> DefinitionMap
;
767 ///! Initialize a makefile from its parent
768 void InitializeFromParent();
770 ///! Set/Get the preorder flag
771 void SetPreOrder(bool p
) { this->PreOrder
= p
; }
772 bool GetPreOrder() const { return this->PreOrder
; }
774 void AddInstallGenerator(cmInstallGenerator
* g
)
775 { if(g
) this->InstallGenerators
.push_back(g
); }
776 std::vector
<cmInstallGenerator
*>& GetInstallGenerators()
777 { return this->InstallGenerators
; }
779 // Define the properties
780 static void DefineProperties(cmake
*cm
);
782 // push and pop variable scopes
785 void RaiseScope(const char *var
, const char *value
);
787 /** Issue messages with the given text plus context information. */
788 void IssueWarning(std::string
const& msg
) const;
789 void IssueError(std::string
const& msg
) const;
792 // add link libraries and directories to the target
793 void AddGlobalLinkInformation(const char* name
, cmTarget
& target
);
796 std::vector
<std::string
> AuxSourceDirectories
; //
798 std::string cmStartDirectory
;
799 std::string StartOutputDirectory
;
800 std::string cmHomeDirectory
;
801 std::string HomeOutputDirectory
;
802 std::string cmCurrentListFile
;
804 std::string ProjectName
; // project name
806 // libraries, classes, and executables
808 std::vector
<cmSourceFile
*> SourceFiles
;
811 std::vector
<cmTest
*> Tests
;
813 // The include and link-library paths. These may have order
814 // dependency, so they must be vectors (not set).
815 std::vector
<std::string
> IncludeDirectories
;
816 std::vector
<std::string
> LinkDirectories
;
818 // The set of include directories that are marked as system include
820 std::set
<cmStdString
> SystemIncludeDirectories
;
822 std::vector
<std::string
> ListFiles
; // list of command files loaded
823 std::vector
<std::string
> OutputFiles
; // list of command files loaded
826 cmTarget::LinkLibraryVectorType LinkLibraries
;
828 std::vector
<cmInstallGenerator
*> InstallGenerators
;
830 std::string IncludeFileRegularExpression
;
831 std::string ComplainFileRegularExpression
;
832 std::vector
<std::string
> SourceFileExtensions
;
833 std::vector
<std::string
> HeaderFileExtensions
;
834 std::string DefineFlags
;
836 #if defined(CMAKE_BUILD_WITH_CMAKE)
837 std::vector
<cmSourceGroup
> SourceGroups
;
840 std::vector
<DefinitionMap
> DefinitionStack
;
841 std::vector
<cmCommand
*> UsedCommands
;
842 cmLocalGenerator
* LocalGenerator
;
843 bool IsFunctionBlocked(const cmListFileFunction
& lff
,
844 cmExecutionStatus
&status
);
849 bool ParseDefineFlag(std::string
const& definition
, bool remove
);
851 void ReadSources(std::ifstream
& fin
, bool t
);
852 friend class cmMakeDepend
; // make depend needs direct access
853 // to the Sources array
854 void PrintStringVector(const char* s
, const
855 std::vector
<std::pair
<cmStdString
, bool> >& v
) const;
856 void PrintStringVector(const char* s
,
857 const std::vector
<std::string
>& v
) const;
859 void AddDefaultDefinitions();
860 std::list
<cmFunctionBlocker
*> FunctionBlockers
;
862 typedef std::map
<cmStdString
, cmData
*> DataMapType
;
865 typedef std::map
<cmStdString
, cmStdString
> StringStringMap
;
866 StringStringMap MacrosMap
;
868 std::map
<cmStdString
, bool> SubDirectoryOrder
;
869 // used in AddDefinition for performance improvement
870 DefinitionMap::key_type TemporaryDefinitionKey
;
872 cmsys::RegularExpression cmDefineRegex
;
873 cmsys::RegularExpression cmDefine01Regex
;
874 cmsys::RegularExpression cmAtVarRegex
;
876 cmPropertyMap Properties
;
878 // should this makefile be processed before or after processing the parent
881 // stack of list files being read
882 std::deque
<cmStdString
> ListFileStack
;
884 // stack of commands being invoked.
885 struct CallStackEntry
887 cmListFileContext
const* Context
;
888 cmExecutionStatus
* Status
;
890 typedef std::deque
<CallStackEntry
> CallStackType
;
891 CallStackType CallStack
;
892 friend class cmMakefileCall
;
894 void IssueMessage(std::string
const& text
, bool isError
) const;
896 cmTarget
* FindBasicTarget(const char* name
);
897 std::vector
<cmTarget
*> ImportedTargetsOwned
;
898 std::map
<cmStdString
, cmTarget
*> ImportedTargets
;
900 // stack of policy settings
901 typedef std::map
<cmPolicies::PolicyID
,
902 cmPolicies::PolicyStatus
> PolicyMap
;
903 std::vector
<PolicyMap
> PolicyStack
;