diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/cmListFileCache.h | 3 | ||||
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 17 | ||||
-rw-r--r-- | Source/cmLocalNinjaGenerator.h | 1 |
4 files changed, 18 insertions, 5 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 9f3731d..df07c51 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 5) -set(CMake_VERSION_PATCH 20160211) +set(CMake_VERSION_PATCH 20160212) #set(CMake_VERSION_RC 1) diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index 03e0abe..4d3055f 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -58,8 +58,9 @@ struct cmListFileArgument long Line; }; -struct cmListFileContext +class cmListFileContext { +public: std::string Name; std::string FilePath; long Line; diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index b2927a9..8a68af6 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -454,13 +454,24 @@ cmLocalNinjaGenerator::WriteCustomCommandBuildStatement( void cmLocalNinjaGenerator::AddCustomCommandTarget(cmCustomCommand const* cc, cmGeneratorTarget* target) { - this->CustomCommandTargets[cc].insert(target); + CustomCommandTargetMap::value_type v(cc, std::set<cmGeneratorTarget*>()); + std::pair<CustomCommandTargetMap::iterator, bool> + ins = this->CustomCommandTargets.insert(v); + if (ins.second) + { + this->CustomCommands.push_back(cc); + } + ins.first->second.insert(target); } void cmLocalNinjaGenerator::WriteCustomCommandBuildStatements() { - for (CustomCommandTargetMap::iterator i = this->CustomCommandTargets.begin(); - i != this->CustomCommandTargets.end(); ++i) { + for (std::vector<cmCustomCommand const*>::iterator vi = + this->CustomCommands.begin(); vi != this->CustomCommands.end(); ++vi) + { + CustomCommandTargetMap::iterator i = this->CustomCommandTargets.find(*vi); + assert(i != this->CustomCommandTargets.end()); + // A custom command may appear on multiple targets. However, some build // systems exist where the target dependencies on some of the targets are // overspecified, leading to a dependency cycle. If we assume all target diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index b6987ef..5e1d6f2 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -106,6 +106,7 @@ private: typedef std::map<cmCustomCommand const*, std::set<cmGeneratorTarget*> > CustomCommandTargetMap; CustomCommandTargetMap CustomCommandTargets; + std::vector<cmCustomCommand const*> CustomCommands; }; #endif // ! cmLocalNinjaGenerator_h |