summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-08-08 15:54:46 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-08-08 15:54:46 (GMT)
commitdb1303aa7d00f49a0fdf66f120eb3e6cb0e445fe (patch)
treead569e72f02849e50e625faa1350bb05a3af08f9 /Source/cmMakefile.h
parent61ec323b6a1c4e5a44331014447e3d1d31dc1b6b (diff)
downloadCMake-db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe.zip
CMake-db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe.tar.gz
CMake-db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe.tar.bz2
ENH: big change, only allow commands access to the cache via the cmMakefile class and GetDefinition, also the cmMakefile is the only way for commands to add to the cache. Also, some changes to configure.in that check for for scoping
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r--Source/cmMakefile.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 78e42c7..5119599 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -47,6 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmSystemTools.h"
#include "cmSourceGroup.h"
#include "cmTarget.h"
+#include "cmCacheManager.h"
+
class cmFunctionBlocker;
class cmCommand;
class cmMakefileGenerator;
@@ -213,11 +215,17 @@ public:
* can be used in CMake to refer to lists, directories, etc.
*/
void AddDefinition(const char* name, const char* value);
+ ///! Add a definition to this makefile and the global cmake cache.
+ void AddCacheDefinition(const char* name, const char* value,
+ const char* doc,
+ cmCacheManager::CacheEntryType type);
/**
* Add bool variable definition to the build.
*/
void AddDefinition(const char* name, bool);
+ ///! Add a definition to this makefile and the global cmake cache.
+ void AddCacheDefinition(const char* name, bool, const char* doc);
/**
* Specify the name of the project for this build.
@@ -440,8 +448,15 @@ public:
/**
* Given a variable name, return its value (as a string).
+ * If the variable is not found in this makefile instance, the
+ * cache is then queried.
*/
const char* GetDefinition(const char*);
+
+ /** Test a boolean cache entry to see if it is true or false,
+ * returns false if no entry defined.
+ */
+ bool IsOn(const char* name);
/**
* Get a list of preprocessor define flags.