1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmMakefile.h,v $
6 Date: $Date: 2008-08-25 14:31:28 $
7 Version: $Revision: 1.235 $
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"
30 #if defined(CMAKE_BUILD_WITH_CMAKE)
31 #include "cmSourceGroup.h"
34 #include <cmsys/RegularExpression.hxx>
36 class cmFunctionBlocker
;
38 class cmInstallGenerator
;
39 class cmLocalGenerator
;
43 class cmVariableWatch
;
48 * \brief Process the input CMakeLists.txt file.
50 * Process and store into memory the input CMakeLists.txt file.
51 * Each CMakeLists.txt file is parsed and the commands found there
52 * are added into the build process.
58 * Return the major and minor version of the cmake that
59 * was used to write the currently loaded cache, note
60 * this method will not work before the cache is loaded.
62 unsigned int GetCacheMajorVersion();
63 unsigned int GetCacheMinorVersion();
65 /** Return whether compatibility features needed for a version of
66 the cache or lower should be enabled. */
67 bool NeedCacheCompatibility(int major
, int minor
);
70 * Construct an empty makefile.
73 cmMakefile(const cmMakefile
& mf
);
81 * Read and parse a CMakeLists.txt file.
83 bool ReadListFile(const char* listfile
,
84 const char* external
= 0,
85 std::string
* fullPath
= 0);
88 * Add a function blocker to this makefile
90 void AddFunctionBlocker(cmFunctionBlocker
*fb
)
91 { this->FunctionBlockers
.push_back(fb
);}
92 void RemoveFunctionBlocker(cmFunctionBlocker
*fb
)
93 { this->FunctionBlockers
.remove(fb
);}
94 void RemoveFunctionBlocker(const cmListFileFunction
& lff
);
97 * Try running cmake and building a file. This is used for dynalically
98 * loaded commands, not as part of the usual build process.
100 int TryCompile(const char *srcdir
, const char *bindir
,
101 const char *projectName
, const char *targetName
,
102 const std::vector
<std::string
> *cmakeArgs
,
103 std::string
*output
);
106 * Specify the makefile generator. This is platform/compiler
107 * dependent, although the interface is through a generic
110 void SetLocalGenerator(cmLocalGenerator
*);
112 ///! Get the current makefile generator.
113 cmLocalGenerator
* GetLocalGenerator()
114 { return this->LocalGenerator
;}
117 * Test whether compatibility is set to a given version or lower.
119 bool NeedBackwardsCompatibility(unsigned int major
,
121 unsigned int patch
= 0xFFu
);
124 * Help enforce global target name uniqueness.
126 bool EnforceUniqueName(std::string
const& name
, std::string
& msg
,
127 bool isCustom
= false);
130 * Perform FinalPass, Library dependency analysis etc before output of the
133 void ConfigureFinalPass();
136 * run the final pass on all commands.
141 * Print the object state to std::cout.
145 /** Add a custom command to the build. */
146 void AddCustomCommandToTarget(const char* target
,
147 const std::vector
<std::string
>& depends
,
148 const cmCustomCommandLines
& commandLines
,
149 cmTarget::CustomCommandType type
,
150 const char* comment
, const char* workingDir
,
151 bool escapeOldStyle
= true);
152 void AddCustomCommandToOutput(const std::vector
<std::string
>& outputs
,
153 const std::vector
<std::string
>& depends
,
154 const char* main_dependency
,
155 const cmCustomCommandLines
& commandLines
,
156 const char* comment
, const char* workingDir
,
157 bool replace
= false,
158 bool escapeOldStyle
= true);
159 void AddCustomCommandToOutput(const char* output
,
160 const std::vector
<std::string
>& depends
,
161 const char* main_dependency
,
162 const cmCustomCommandLines
& commandLines
,
163 const char* comment
, const char* workingDir
,
164 bool replace
= false,
165 bool escapeOldStyle
= true);
166 void AddCustomCommandOldStyle(const char* target
,
167 const std::vector
<std::string
>& outputs
,
168 const std::vector
<std::string
>& depends
,
170 const cmCustomCommandLines
& commandLines
,
171 const char* comment
);
174 * Add a define flag to the build.
176 void AddDefineFlag(const char* definition
);
177 void RemoveDefineFlag(const char* definition
);
179 /** Create a new imported target with the name and type given. */
180 cmTarget
* AddImportedTarget(const char* name
, cmTarget::TargetType type
);
182 cmTarget
* AddNewTarget(cmTarget::TargetType type
, const char* name
);
185 * Add an executable to the build.
187 cmTarget
* AddExecutable(const char *exename
,
188 const std::vector
<std::string
> &srcs
,
189 bool excludeFromAll
= false);
192 * Add a utility to the build. A utiltity target is a command that
193 * is run every time the target is built.
195 void AddUtilityCommand(const char* utilityName
, bool excludeFromAll
,
196 const std::vector
<std::string
>& depends
,
197 const char* workingDirectory
,
203 void AddUtilityCommand(const char* utilityName
, bool excludeFromAll
,
204 const char* workingDirectory
,
205 const std::vector
<std::string
>& depends
,
206 const cmCustomCommandLines
& commandLines
,
207 bool escapeOldStyle
= true,
208 const char* comment
= 0);
211 * Add a link library to the build.
213 void AddLinkLibrary(const char*);
214 void AddLinkLibrary(const char*, cmTarget::LinkLibraryType type
);
215 void AddLinkLibraryForTarget(const char *tgt
, const char*,
216 cmTarget::LinkLibraryType type
);
217 void AddLinkDirectoryForTarget(const char *tgt
, const char* d
);
220 * Add a link directory to the build.
222 void AddLinkDirectory(const char*);
225 * Get the list of link directories
227 std::vector
<std::string
>& GetLinkDirectories()
229 return this->LinkDirectories
;
231 const std::vector
<std::string
>& GetLinkDirectories() const
233 return this->LinkDirectories
;
235 void SetLinkDirectories(const std::vector
<std::string
>& vec
)
237 this->LinkDirectories
= vec
;
241 * Add a subdirectory to the build.
243 void AddSubDirectory(const char*, bool excludeFromAll
=false,
244 bool preorder
= false);
245 void AddSubDirectory(const char* fullSrcDir
,const char *fullBinDir
,
246 bool excludeFromAll
, bool preorder
,
250 * Configure a subdirectory
252 void ConfigureSubDirectory(cmLocalGenerator
*);
255 * Add an include directory to the build.
257 void AddIncludeDirectory(const char*, bool before
= false);
260 * Add a variable definition to the build. This variable
261 * can be used in CMake to refer to lists, directories, etc.
263 void AddDefinition(const char* name
, const char* value
);
264 ///! Add a definition to this makefile and the global cmake cache.
265 void AddCacheDefinition(const char* name
, const char* value
,
267 cmCacheManager::CacheEntryType type
);
270 * Add bool variable definition to the build.
272 void AddDefinition(const char* name
, bool);
273 ///! Add a definition to this makefile and the global cmake cache.
274 void AddCacheDefinition(const char* name
, bool, const char* doc
);
277 * Remove a variable definition from the build. This is not valid
278 * for cache entries, and will only affect the current makefile.
280 void RemoveDefinition(const char* name
);
281 ///! Remove a definition from the cache.
282 void RemoveCacheDefinition(const char* name
);
285 * Specify the name of the project for this build.
287 void SetProjectName(const char*);
290 * Get the name of the project for this build.
292 const char* GetProjectName() const
294 return this->ProjectName
.c_str();
298 * Set the name of the library.
300 void AddLibrary(const char *libname
, cmTarget::TargetType type
,
301 const std::vector
<std::string
> &srcs
,
302 bool excludeFromAll
= false);
304 #if defined(CMAKE_BUILD_WITH_CMAKE)
306 * Add a root source group for consideration when adding a new source.
308 void AddSourceGroup(const char* name
, const char* regex
=0);
311 * Add a source group for consideration when adding a new source.
314 void AddSourceGroup(const std::vector
<std::string
>& name
,
315 const char* regex
=0);
321 * Set, Push, Pop policy values for CMake.
323 bool SetPolicy(cmPolicies::PolicyID id
, cmPolicies::PolicyStatus status
);
324 bool SetPolicy(const char *id
, cmPolicies::PolicyStatus status
);
325 cmPolicies::PolicyStatus
GetPolicyStatus(cmPolicies::PolicyID id
);
327 bool PopPolicy(bool reportError
= true);
328 bool SetPolicyVersion(const char *version
);
332 * Get the Policies Instance
334 cmPolicies
*GetPolicies();
337 * Add an auxiliary directory to the build.
339 void AddExtraDirectory(const char* dir
);
343 * Add an auxiliary directory to the build.
345 void MakeStartDirectoriesCurrent()
347 this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
348 this->cmStartDirectory
.c_str());
349 this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
350 this->StartOutputDirectory
.c_str());
355 * Set/Get the home directory (or output directory) in the project. The
356 * home directory is the top directory of the project. It is where
357 * CMakeSetup or configure was run. Remember that CMake processes
358 * CMakeLists files by recursing up the tree starting at the StartDirectory
359 * and going up until it reaches the HomeDirectory.
361 void SetHomeDirectory(const char* dir
);
362 const char* GetHomeDirectory() const
364 return this->cmHomeDirectory
.c_str();
366 void SetHomeOutputDirectory(const char* lib
);
367 const char* GetHomeOutputDirectory() const
369 return this->HomeOutputDirectory
.c_str();
375 * Set/Get the start directory (or output directory). The start directory
376 * is the directory of the CMakeLists.txt file that started the current
377 * round of processing. Remember that CMake processes CMakeLists files by
378 * recursing up the tree starting at the StartDirectory and going up until
379 * it reaches the HomeDirectory.
381 void SetStartDirectory(const char* dir
)
383 this->cmStartDirectory
= dir
;
384 cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory
);
385 this->cmStartDirectory
=
386 cmSystemTools::CollapseFullPath(this->cmStartDirectory
.c_str());
387 this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
388 this->cmStartDirectory
.c_str());
390 const char* GetStartDirectory() const
392 return this->cmStartDirectory
.c_str();
394 void SetStartOutputDirectory(const char* lib
)
396 this->StartOutputDirectory
= lib
;
397 cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory
);
398 this->StartOutputDirectory
=
399 cmSystemTools::CollapseFullPath(this->StartOutputDirectory
.c_str());
400 cmSystemTools::MakeDirectory(this->StartOutputDirectory
.c_str());
401 this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
402 this->StartOutputDirectory
.c_str());
404 const char* GetStartOutputDirectory() const
406 return this->StartOutputDirectory
.c_str();
410 const char* GetCurrentDirectory() const
412 return this->cmStartDirectory
.c_str();
414 const char* GetCurrentOutputDirectory() const
416 return this->StartOutputDirectory
.c_str();
419 /* Get the current CMakeLists.txt file that is being processed. This
420 * is just used in order to be able to 'branch' from one file to a second
422 const char* GetCurrentListFile() const
424 return this->cmCurrentListFile
.c_str();
430 * Set a regular expression that include files must match
431 * in order to be considered as part of the depend information.
433 void SetIncludeRegularExpression(const char* regex
)
435 this->IncludeFileRegularExpression
= regex
;
437 const char* GetIncludeRegularExpression()
439 return this->IncludeFileRegularExpression
.c_str();
443 * Set a regular expression that include files that are not found
444 * must match in order to be considered a problem.
446 void SetComplainRegularExpression(const char* regex
)
448 this->ComplainFileRegularExpression
= regex
;
450 const char* GetComplainRegularExpression()
452 return this->ComplainFileRegularExpression
.c_str();
456 * Get the list of targets
458 cmTargets
&GetTargets() { return this->Targets
; }
460 * Get the list of targets, const version
462 const cmTargets
&GetTargets() const { return this->Targets
; }
464 cmTarget
* FindTarget(const char* name
);
466 /** Find a target to use in place of the given name. The target
467 returned may be imported or built within the project. */
468 cmTarget
* FindTargetToUse(const char* name
);
471 * Get a list of include directories in the build.
473 std::vector
<std::string
>& GetIncludeDirectories()
475 return this->IncludeDirectories
;
477 const std::vector
<std::string
>& GetIncludeDirectories() const
479 return this->IncludeDirectories
;
481 void SetIncludeDirectories(const std::vector
<std::string
>& vec
)
483 this->IncludeDirectories
= vec
;
487 * Mark include directories as system directories.
489 void AddSystemIncludeDirectory(const char* dir
);
490 bool IsSystemIncludeDirectory(const char* dir
);
492 /** Expand out any arguements in the vector that have ; separated
493 * strings into multiple arguements. A new vector is created
494 * containing the expanded versions of all arguments in argsIn.
495 * This method differes from the one in cmSystemTools in that if
496 * the CmakeLists file is version 1.2 or earlier it will check for
497 * source lists being used without ${} around them
499 void ExpandSourceListArguments(std::vector
<std::string
> const& argsIn
,
500 std::vector
<std::string
>& argsOut
,
501 unsigned int startArgumentIndex
);
503 /** Get a cmSourceFile pointer for a given source name, if the name is
504 * not found, then a null pointer is returned.
506 cmSourceFile
* GetSource(const char* sourceName
);
508 /** Get a cmSourceFile pointer for a given source name, if the name is
509 * not found, then create the source file and return it. generated
510 * indicates if it is a generated file, this is used in determining
511 * how to create the source file instance e.g. name
513 cmSourceFile
* GetOrCreateSource(const char* sourceName
,
514 bool generated
= false);
517 * Obtain a list of auxiliary source directories.
519 std::vector
<std::string
>& GetAuxSourceDirectories()
520 {return this->AuxSourceDirectories
;}
524 * Return a list of extensions associated with source and header
527 const std::vector
<std::string
>& GetSourceExtensions() const
528 {return this->SourceFileExtensions
;}
529 const std::vector
<std::string
>& GetHeaderExtensions() const
530 {return this->HeaderFileExtensions
;}
534 * Given a variable name, return its value (as a string).
535 * If the variable is not found in this makefile instance, the
536 * cache is then queried.
538 const char* GetDefinition(const char*) const;
539 const char* GetSafeDefinition(const char*) const;
540 const char* GetRequiredDefinition(const char* name
) const;
541 bool IsDefinitionSet(const char*) const;
543 * Get the list of all variables in the current space. If argument
544 * cacheonly is specified and is greater than 0, then only cache
545 * variables will be listed.
547 std::vector
<std::string
> GetDefinitions(int cacheonly
=0) const;
549 /** Test a boolean cache entry to see if it is true or false,
550 * returns false if no entry defined.
552 bool IsOn(const char* name
) const;
553 bool IsSet(const char* name
) const;
556 * Get a list of preprocessor define flags.
558 const char* GetDefineFlags()
559 {return this->DefineFlags
.c_str();}
562 * Make sure CMake can write this file
564 bool CanIWriteThisFile(const char* fileName
);
567 * Get the vector of used command instances.
569 const std::vector
<cmCommand
*>& GetUsedCommands() const
570 {return this->UsedCommands
;}
572 #if defined(CMAKE_BUILD_WITH_CMAKE)
574 * Get the vector source groups.
576 const std::vector
<cmSourceGroup
>& GetSourceGroups() const
577 { return this->SourceGroups
; }
580 * Get the source group
582 cmSourceGroup
* GetSourceGroup(const std::vector
<std::string
>&name
);
586 * Get the vector of list files on which this makefile depends
588 const std::vector
<std::string
>& GetListFiles() const
589 { return this->ListFiles
; }
590 ///! When the file changes cmake will be re-run from the build system.
591 void AddCMakeDependFile(const char* file
)
592 { this->ListFiles
.push_back(file
);}
595 * Get the list file stack as a string
597 std::string
GetListFileStack();
600 * Get the current context backtrace.
602 bool GetBacktrace(cmListFileBacktrace
& backtrace
) const;
605 * Get the vector of files created by this makefile
607 const std::vector
<std::string
>& GetOutputFiles() const
608 { return this->OutputFiles
; }
609 void AddCMakeOutputFile(const char* file
)
610 { this->OutputFiles
.push_back(file
);}
613 * Expand all defined variables in the string.
614 * Defined variables come from the this->Definitions map.
615 * They are expanded with ${var} where var is the
616 * entry in the this->Definitions map. Also @var@ is
617 * expanded to match autoconf style expansions.
619 const char *ExpandVariablesInString(std::string
& source
);
620 const char *ExpandVariablesInString(std::string
& source
, bool escapeQuotes
,
623 const char* filename
= 0,
625 bool removeEmpty
= false,
626 bool replaceAt
= true);
629 * Remove any remaining variables in the string. Anything with ${var} or
630 * @var@ will be removed.
632 void RemoveVariablesInString(std::string
& source
,
633 bool atOnly
= false) const;
636 * Expand variables in the makefiles ivars such as link directories etc
638 void ExpandVariables();
641 * Replace variables and #cmakedefine lines in the given string.
642 * See cmConfigureFileCommand for details.
644 void ConfigureString(const std::string
& input
, std::string
& output
,
645 bool atOnly
, bool escapeQuotes
);
648 * Copy file but change lines acording to ConfigureString
650 int ConfigureFile(const char* infile
, const char* outfile
,
651 bool copyonly
, bool atOnly
, bool escapeQuotes
);
653 #if defined(CMAKE_BUILD_WITH_CMAKE)
655 * find what source group this source is in
657 cmSourceGroup
& FindSourceGroup(const char* source
,
658 std::vector
<cmSourceGroup
> &groups
);
661 void RegisterData(cmData
*);
662 void RegisterData(const char*, cmData
*);
663 cmData
* LookupData(const char*) const;
666 * Execute a single CMake command. Returns true if the command
667 * succeeded or false if it failed.
669 bool ExecuteCommand(const cmListFileFunction
& lff
,
670 cmExecutionStatus
&status
);
672 /** Check if a command exists. */
673 bool CommandExists(const char* name
) const;
676 * Add a command to this cmake instance
678 void AddCommand(cmCommand
* );
680 ///! Enable support for named language, if nil then all languages are
682 void EnableLanguage(std::vector
<std::string
>const& languages
, bool optional
);
685 * Set/Get the name of the parent directories CMakeLists file
686 * given a current CMakeLists file name
688 cmCacheManager
*GetCacheManager() const;
691 * Get the variable watch. This is used to determine when certain variables
694 #ifdef CMAKE_BUILD_WITH_CMAKE
695 cmVariableWatch
* GetVariableWatch() const;
698 ///! Display progress or status message.
699 void DisplayStatus(const char*, float);
702 * Expand the given list file arguments into the full set after
703 * variable replacement and list expansion.
705 void ExpandArguments(std::vector
<cmListFileArgument
> const& inArgs
,
706 std::vector
<std::string
>& outArgs
);
710 cmake
*GetCMakeInstance() const;
713 * Get all the source files this makefile knows about
715 const std::vector
<cmSourceFile
*> &GetSourceFiles() const
716 {return this->SourceFiles
;}
717 std::vector
<cmSourceFile
*> &GetSourceFiles() {return this->SourceFiles
;}
720 * Is there a source file that has the provided source file as an output?
721 * if so then return it
723 cmSourceFile
*GetSourceFileWithOutput(const char *outName
);
726 * Add a macro to the list of macros. The arguments should be name of the
727 * macro and a documentation signature of it
729 void AddMacro(const char* name
, const char* signature
);
731 ///! Add a new cmTest to the list of tests for this makefile.
732 cmTest
* CreateTest(const char* testName
);
734 /** Get a cmTest pointer for a given test name, if the name is
735 * not found, then a null pointer is returned.
737 cmTest
* GetTest(const char* testName
) const;
738 const std::vector
<cmTest
*> *GetTests() const;
739 std::vector
<cmTest
*> *GetTests();
742 * Get a list of macros as a ; separated string
744 void GetListOfMacros(std::string
& macros
);
747 * Return a location of a file in cmake or custom modules directory
749 std::string
GetModulesFile(const char* name
);
751 ///! Set/Get a property of this directory
752 void SetProperty(const char *prop
, const char *value
);
753 void AppendProperty(const char *prop
, const char *value
);
754 const char *GetProperty(const char *prop
);
755 const char *GetPropertyOrDefinition(const char *prop
);
756 const char *GetProperty(const char *prop
, cmProperty::ScopeType scope
);
757 bool GetPropertyAsBool(const char *prop
);
759 // Get the properties
760 cmPropertyMap
&GetProperties() { return this->Properties
; };
762 typedef std::map
<cmStdString
, cmStdString
> DefinitionMap
;
763 ///! Initialize a makefile from its parent
764 void InitializeFromParent();
766 ///! Set/Get the preorder flag
767 void SetPreOrder(bool p
) { this->PreOrder
= p
; }
768 bool GetPreOrder() const { return this->PreOrder
; }
770 void AddInstallGenerator(cmInstallGenerator
* g
)
771 { if(g
) this->InstallGenerators
.push_back(g
); }
772 std::vector
<cmInstallGenerator
*>& GetInstallGenerators()
773 { return this->InstallGenerators
; }
775 // Define the properties
776 static void DefineProperties(cmake
*cm
);
778 // push and pop variable scopes
781 void RaiseScope(const char *var
, const char *value
);
783 void IssueMessage(cmake::MessageType t
,
784 std::string
const& text
) const;
786 /** Set whether or not to report a CMP0000 violation. */
787 void SetCheckCMP0000(bool b
) { this->CheckCMP0000
= b
; }
790 // add link libraries and directories to the target
791 void AddGlobalLinkInformation(const char* name
, cmTarget
& target
);
794 std::vector
<std::string
> AuxSourceDirectories
; //
796 std::string cmStartDirectory
;
797 std::string StartOutputDirectory
;
798 std::string cmHomeDirectory
;
799 std::string HomeOutputDirectory
;
800 std::string cmCurrentListFile
;
802 std::string ProjectName
; // project name
804 // libraries, classes, and executables
806 std::vector
<cmSourceFile
*> SourceFiles
;
809 std::vector
<cmTest
*> Tests
;
811 // The include and link-library paths. These may have order
812 // dependency, so they must be vectors (not set).
813 std::vector
<std::string
> IncludeDirectories
;
814 std::vector
<std::string
> LinkDirectories
;
816 // The set of include directories that are marked as system include
818 std::set
<cmStdString
> SystemIncludeDirectories
;
820 std::vector
<std::string
> ListFiles
; // list of command files loaded
821 std::vector
<std::string
> OutputFiles
; // list of command files loaded
824 cmTarget::LinkLibraryVectorType LinkLibraries
;
826 std::vector
<cmInstallGenerator
*> InstallGenerators
;
828 std::string IncludeFileRegularExpression
;
829 std::string ComplainFileRegularExpression
;
830 std::vector
<std::string
> SourceFileExtensions
;
831 std::vector
<std::string
> HeaderFileExtensions
;
832 std::string DefineFlags
;
834 // Track the value of the computed DEFINITIONS property.
835 void AddDefineFlag(const char*, std::string
&);
836 void RemoveDefineFlag(const char*, std::string::size_type
, std::string
&);
837 std::string DefineFlagsOrig
;
839 #if defined(CMAKE_BUILD_WITH_CMAKE)
840 std::vector
<cmSourceGroup
> SourceGroups
;
843 std::vector
<DefinitionMap
> DefinitionStack
;
844 std::vector
<cmCommand
*> UsedCommands
;
845 cmLocalGenerator
* LocalGenerator
;
846 bool IsFunctionBlocked(const cmListFileFunction
& lff
,
847 cmExecutionStatus
&status
);
852 bool ParseDefineFlag(std::string
const& definition
, bool remove
);
854 void ReadSources(std::ifstream
& fin
, bool t
);
855 friend class cmMakeDepend
; // make depend needs direct access
856 // to the Sources array
857 void PrintStringVector(const char* s
, const
858 std::vector
<std::pair
<cmStdString
, bool> >& v
) const;
859 void PrintStringVector(const char* s
,
860 const std::vector
<std::string
>& v
) const;
862 void AddDefaultDefinitions();
863 std::list
<cmFunctionBlocker
*> FunctionBlockers
;
865 typedef std::map
<cmStdString
, cmData
*> DataMapType
;
868 typedef std::map
<cmStdString
, cmStdString
> StringStringMap
;
869 StringStringMap MacrosMap
;
871 std::map
<cmStdString
, bool> SubDirectoryOrder
;
872 // used in AddDefinition for performance improvement
873 DefinitionMap::key_type TemporaryDefinitionKey
;
875 cmsys::RegularExpression cmDefineRegex
;
876 cmsys::RegularExpression cmDefine01Regex
;
877 cmsys::RegularExpression cmAtVarRegex
;
879 cmPropertyMap Properties
;
881 // should this makefile be processed before or after processing the parent
884 // stack of list files being read
885 std::deque
<cmStdString
> ListFileStack
;
887 // stack of commands being invoked.
888 struct CallStackEntry
890 cmListFileContext
const* Context
;
891 cmExecutionStatus
* Status
;
893 typedef std::deque
<CallStackEntry
> CallStackType
;
894 CallStackType CallStack
;
895 friend class cmMakefileCall
;
897 cmTarget
* FindBasicTarget(const char* name
);
898 std::vector
<cmTarget
*> ImportedTargetsOwned
;
899 std::map
<cmStdString
, cmTarget
*> ImportedTargets
;
901 // stack of policy settings
902 typedef std::map
<cmPolicies::PolicyID
,
903 cmPolicies::PolicyStatus
> PolicyMap
;
904 std::vector
<PolicyMap
> PolicyStack
;
905 cmPolicies::PolicyStatus
GetPolicyStatusInternal(cmPolicies::PolicyID id
);
909 // Enforce rules about CMakeLists.txt files.
910 void EnforceDirectoryLevelRules(bool endScopeNicely
);