[cmake-developers] CMake is slow for project with hundred target and one command with large number of dependencies
Brad King
brad.king at kitware.com
Tue Aug 6 12:44:42 EDT 2013
On 08/06/2013 12:18 PM, Nicolas Desprès wrote:
> The test suite passes on my computer. I have force-pushed again.
Great.
In this hunk:
+ // If the queried path is not absolute we use the backward compatible
+ // version. The search algorithm is linear.
+ if (cname[0] != '/')
Use cmSystemTools::FileIsFullPath to detect a full path in a way that
works on Windows too.
> However I had one problem with BootstrapTest when trying to use cmsys::hash_map
During bootstrap we can just use normal std::map. Squash the patch
below into your topic/use-cmsys-hash_map (and then into the original
topic).
-Brad
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index e51d9c6..f00f47b 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -29,7 +29,9 @@
#include <cmsys/auto_ptr.hxx>
#include <cmsys/RegularExpression.hxx>
-#include <cmsys/hash_map.hxx>
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+# include <cmsys/hash_map.hxx>
+#endif
class cmFunctionBlocker;
class cmCommand;
@@ -1049,7 +1051,11 @@ private:
cmSourceFile *LinearGetSourceFileWithOutput(const char *cname);
// A map for fast output to input look up.
+#if defined(CMAKE_BUILD_WITH_CMAKE)
typedef cmsys::hash_map<std::string, cmSourceFile*> OutputToSourceMap;
+#else
+ typedef std::map<std::string, cmSourceFile*> OutputToSourceMap;
+#endif
OutputToSourceMap OutputToSource;
void UpdateOutputToSourceMap(const std::vector<std::string>& outputs,
diff --git a/bootstrap b/bootstrap
index 9e6bfad..afb66e5 100755
--- a/bootstrap
+++ b/bootstrap
@@ -304,8 +304,6 @@ KWSYS_CXX_SOURCES="\
KWSYS_FILES="\
auto_ptr.hxx \
Directory.hxx \
- hash_map.hxx \
- hashtable.hxx \
Glob.hxx \
Process.h \
RegularExpression.hxx \
More information about the cmake-developers
mailing list