summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-08-09 07:44:15 (GMT)
committerStephen Kelly <steveire@gmail.com>2012-08-20 20:30:11 (GMT)
commit3dae652b4ea8e039dd9f4d845497ec988fbbe82c (patch)
tree22241a616f674ac6fe82375690e8485d19e32725 /Source/cmLocalGenerator.h
parentd46f8afae98cd8f50cff9915a5a9dc680b9e0518 (diff)
downloadCMake-3dae652b4ea8e039dd9f4d845497ec988fbbe82c.zip
CMake-3dae652b4ea8e039dd9f4d845497ec988fbbe82c.tar.gz
CMake-3dae652b4ea8e039dd9f4d845497ec988fbbe82c.tar.bz2
Don't duplicate -D defines sent to the compiler.
There is no need to do so. Be consistent with include directories and ensure uniqueness. This requires changing the API of the cmLocalGenerator::AppendDefines method, and changing the generators to match. The test unfortunately can't test for uniqueness, but it at least verifies that nothing gets lost.
Diffstat (limited to 'Source/cmLocalGenerator.h')
-rw-r--r--Source/cmLocalGenerator.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 39b493f..b3396e3 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -154,8 +154,14 @@ public:
* Encode a list of preprocessor definitions for the compiler
* command line.
*/
- void AppendDefines(std::string& defines, const char* defines_list,
- const char* lang);
+ void AppendDefines(std::set<std::string>& defines,
+ const char* defines_list);
+ /**
+ * Join a set of defines into a definesString with a space separator.
+ */
+ void JoinDefines(const std::set<std::string>& defines,
+ std::string &definesString,
+ const char* lang);
/** Lookup and append options associated with a particular feature. */
void AppendFeatureOptions(std::string& flags, const char* lang,