summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-05-17 12:50:55 (GMT)
committerBrad King <brad.king@kitware.com>2011-05-17 12:50:55 (GMT)
commit4e2185cbd0d37dd642eefdc3365e8985d8f688c0 (patch)
tree8c04e6f85fc029a3afb4b6a43c64a76868575138 /Source/cmMakefileTargetGenerator.h
parenta7e7a04aafdcb91e13180f421df550418041d9bf (diff)
downloadCMake-4e2185cbd0d37dd642eefdc3365e8985d8f688c0.zip
CMake-4e2185cbd0d37dd642eefdc3365e8985d8f688c0.tar.gz
CMake-4e2185cbd0d37dd642eefdc3365e8985d8f688c0.tar.bz2
Make std::map usage more portable in language=>flags/defines maps
Older versions of GCC, the HP compiler, and the SGI MIPSpro compiler do not like the use of make_pair in this case and the conversions it requires: a value of type "const char *" cannot be used to initialize an entity of type "char [1]" /usr/include/g++-3/stl_pair.h:68: assignment of read-only location Instead use a map lookup pattern already used throughout the rest of our source tree.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.h')
-rw-r--r--Source/cmMakefileTargetGenerator.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index db87ebc..b68f8bf 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -216,10 +216,11 @@ protected:
std::string MacContentDirectory;
std::set<cmStdString> MacContentFolders;
+ typedef std::map<cmStdString, cmStdString> ByLanguageMap;
std::string GetFlags(const std::string &l);
- std::map<std::string, std::string> FlagsByLanguage;
+ ByLanguageMap FlagsByLanguage;
std::string GetDefines(const std::string &l);
- std::map<std::string, std::string> DefinesByLanguage;
+ ByLanguageMap DefinesByLanguage;
// Target-wide Fortran module output directory.
bool FortranModuleDirectoryComputed;