diff options
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8e6bc96..4ce9322 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -29,6 +29,7 @@ cmMakefile::cmMakefile() m_DefineFlags = " "; m_MakefileGenerator = 0; this->AddDefaultCommands(); + this->AddDefaultDefinitions(); } void cmMakefile::AddDefaultCommands() @@ -523,5 +524,17 @@ void cmMakefile::GenerateCacheOnly() } } - +/** + * Add the default definitions to the makefile. These values must not + * be dependent on anything that isn't known when this cmMakefile instance + * is constructed. + */ +void cmMakefile::AddDefaultDefinitions() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + this->AddDefinition("CMAKE_CFG","$(CFG)"); +#else + this->AddDefinition("CMAKE_CFG","."); +#endif +} |