summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f7bdd61 Remove VS 6 special case. 5e92c826 Remove some obsolete stuff. 15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream. 931e055d Port all cmOStringStream to std::ostringstream. f194a009 Remove unused cmIStringStream class. 3ec1bb15 cmStandardIncludes: Remove std namespace hack. bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack. 28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler. 837a8a63 cmStandardIncludes: Drop Comeau-related workaround. 4030ddfd Remove Borland-related undef. 17d6a6fd cmStandardIncludes: Remove comment about Borland. 26fb5011 Drop SGI as a CMake host compiler.
| * Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-4/+4
| | | | | | | | All compilers hosting CMake support the std class.
* | Use two-iterator std::set::insert where appropriate.Stephen Kelly2015-01-111-6/+3
|/
* Ninja: Refactor restat to be a string internallyBrad King2014-11-141-9/+9
| | | | | This will allow values other than "" and "1" to be generated in the rules.ninja file.
* Ninja: Implement USES_TERMINAL using the console pool if availablePeter Collingbourne2014-11-141-0/+6
|
* Ninja: factor out the test for console pool supportPeter Collingbourne2014-11-141-3/+7
|
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-11/+11
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* Ninja: Limit custom command side-effects to build folderBrad King2014-10-081-6/+16
| | | | | | | | | | | | Revert commit 7243c951 (Ninja: Don't limit custom cmd side-effects to build folder, 2014-06-27) because it causes every custom command dependency in the source tree to get a phony rule. For large projects these rules get too big for Ninja to handle efficiently. While the original change addressed a valid concern, it did not seem to occur regularly in practice because well-behaved projects generate their side-effects only in the build tree. Until we support explicit specification of side-effects (CMake issue #14963), we will have to use this as a middle-ground.
* Ninja: Fix variable duplication in RSP rulesNils Gladitz2014-10-061-1/+1
| | | | Stream clear() resets stream state but does not actually clear its content.
* Ninja: Use 'console' pool for CMake re-run if possible (#14915)Sylvain Joubert2014-10-031-1/+22
| | | | | | | | | The pre-defined 'console' pool is a non-buffered pool that runs with a depth of 1. CMake re-run cannot be run concurrently and it will eventually output something. A non-buffered pool allows to get it as soon as possible Also, generate the minimal required version of Ninja in the build file.
* Ninja: Prevent compilers to be silently modifiedSylvain Joubert2014-09-221-0/+9
| | | | | | | Unlike with Unix Makefiles generator modifying compiler paths was not protected with Ninja generator. It was possible to modify them in the cache without the expected effect on the generated solution. Also activate corresponding tests with Ninja.
* Ninja: Don't limit custom cmd side-effects to build folder (#14972)Adam Strzelecki2014-06-301-16/+6
| | | | | | | | | | Actually custom command can write wherever it wants to, such as temporary folder or source folder, possibly violating rules that only build folder should be affected. Therefore we should consider custom command dependency at any path as possible side effect adding phony rule. We avoid adding phony rules for regular source files (since the paraent commit) so we no longer need the in-build-tree test to avoid them.
* Ninja: Consider only custom commands deps as side-effects (#14972)Adam Strzelecki2014-06-301-10/+12
| | | | | | | | | | | | | | | | | Since commit v2.8.12~248^2 (Ninja: Custom Command file depends don't need to exist before building, 2013-06-07) all explicit dependencies inside build folder were considered as possible build command side-effects and phony rules were produced for them in case they don't exist when starting to build. This is unnecessary since regular compile inputs need to exist or cmake will fail. Moreover the exception for sources having GENERATED property that can be missing is already handled by WriteAssumedSourceDependencies. This fixes unwanted phony rules for all regular source files when doing in-source build, causing Ninja not complain when such files gets missing, i.e. during development. Also this reduces number of rules in ninja.build. Now only custom command dependencies are considered as possible side-effects.
* Merge topic 'ninja-avoid-double-phony'Brad King2014-06-161-0/+9
|\ | | | | | | | | 04377f1b Ninja: Remove CMake includes from explicit depends (#14972)
| * Ninja: Remove CMake includes from explicit depends (#14972)Adam Strzelecki2014-06-161-0/+9
| | | | | | | | | | | | | | | | | | | | It may happen that CMake include is an explicit dependency for some command, while all CMake includes are set phony in WriteTargetRebuildManifest, this may lead to duplicate phony generate rules which causes ninja warnings. We need to remove implicit CMake includes in WriteUnknownExplicitDependencies. This fixes FindCUDA ninja warnings.
* | ninja: Don't use a stringstream to build an argument listBen Boeckel2014-05-021-14/+14
| | | | | | | | | | Streams are expensive to construct (looks like some locale-related stuff), so use strings instead.
* | Rename local 'dir_max' variables to 'dir'Stephen Kelly2014-03-171-6/+6
| | | | | | | | | | The code is not computing the maximum length directory, as is the case in cmLocalVisualStudioGenerator::ComputeLongestObjectDirectory.
* | cmGlobalGenerator: Make ComputeTargetObjects non-virtualStephen Kelly2014-03-151-23/+0
| | | | | | | | | | | | | | | | Implement it in terms of the ComputeObjectFilenames virtual method on the local generators. Remove the reimplementation from the global generators which are now all functionally identical.
* | cmLocalGenerator: Add ComputeObjectFilenames interface.Stephen Kelly2014-03-131-8/+15
| | | | | | | | | | Implement it in the local generators and use it in the global generators.
* | cmGeneratorTarget: Constify cmSourceFile* in containers.Stephen Kelly2014-03-131-3/+3
| | | | | | | | | | Some of them will be used with other APIs which require value_type to be cmSourceFile const*.
* | cmGlobalGenerator: Extract a ComputeTargetObjectDirectory interface.Stephen Kelly2014-03-131-11/+16
| | | | | | | | Make it public for future external calls.
* | Remove some c_str() calls.Stephen Kelly2014-03-111-2/+2
| | | | | | | | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* | stringapi: Use strings for program pathsBen Boeckel2014-03-081-1/+1
| |
* | stringapi: Use strings for directoriesBen Boeckel2014-03-081-1/+1
| |
* | stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-3/+3
| |
* | strings: Remove cmStdString referencesBen Boeckel2014-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* | stringapi: Use strings for VS project namesBen Boeckel2014-03-081-1/+1
| |
* | stringapi: Use strings in target nameBen Boeckel2014-03-081-3/+3
|/
* Ninja: Normalize paths of CMake re-run rule dependenciesBrad King2014-01-211-6/+14
| | | | | Send all implicit dependencies through ConvertToNinjaPath. Add CMakeCache.txt before uniquifying the list.
* Merge topic 'ninja_fix_rerun'Brad King2014-01-161-3/+0
|\ | | | | | | | | 20e595ab Revert "Ninja: Track configured files so we can regenerate them."
| * Revert "Ninja: Track configured files so we can regenerate them."Brad King2014-01-151-3/+0
| | | | | | | | | | | | | | | | | | | | Revert commit 4a6397a7 (Ninja: Track configured files so we can regenerate them, 2013-06-17). The files reported by the method cmMakefile::GetOutputFiles() must cause CMake to re-run only if they are missing and without considering a timestamp. This is not the meaning of the implicit dependencies field so Ninja re-runs CMake too often. Another solution will have to be found to the original problem.
* | Merge topic 'revert-ninja_fix_rerun'Brad King2014-01-161-24/+5
|\ \ | | | | | | | | | | | | 79859689 Revert "Ninja: Avoid re-running CMake on next build after regeneration"
| * | Revert "Ninja: Avoid re-running CMake on next build after regeneration"Brad King2014-01-151-24/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 6fac24d7 (Ninja: Avoid re-running CMake on next build after regeneration, 2014-01-09). The files reported by the method cmMakefile::GetOutputFiles() must cause CMake to re-run only if they are missing and without considering a timestamp. Therefore they cannot be listed as outputs of the re-run rule or Ninja will re-run CMake every time because the timestamp of configure_file outputs does not change. Another solution will have to be found to the original problem.
* | | Merge topic 'ninja_fix_rerun'Brad King2014-01-131-5/+24
|\ \ \ | |/ / | | | | | | | | | 6fac24d7 Ninja: Avoid re-running CMake on next build after regeneration
| * | Ninja: Avoid re-running CMake on next build after regenerationRobert Maynard2014-01-131-5/+24
| |/ | | | | | | | | | | | | | | In commit 4a6397a7 (Ninja: Track configured files so we can regenerate them, 2013-06-17) we accidentally started listing files generated by CMake as inputs to the configuration process instead of outputs from it. Move the list of files generated by CMake to the regeneration rule outputs section and tell Ninja to restat after running it.
* | cmGeneratorTarget: Add methods to access source file groups.Stephen Kelly2014-01-091-3/+5
| | | | | | | | | | These methods and others will be able to get a config parameter later to implement the INTERFACE_SOURCES feature.
* | Constify handling of target dependencies.Stephen Kelly2013-12-111-2/+2
| |
* | Teach GenerateBuildCommand to find its own make programBrad King2013-11-181-1/+3
| | | | | | | | | | | | | | | | Add a cmGlobalGenerator::SelectMakeProgram method to select a caller-provided make program, the CMAKE_MAKE_PROGRAM cache entry, or a generator-provided default. Call it from all implementations of the GenerateBuildCommand method with the corresponding generator's default, if any.
* | cmGlobalGenerator: Cleanup GenerateBuildCommand APIBrad King2013-11-181-31/+16
| | | | | | | | | | | | | | | | | | All cmGlobalGenerator::GenerateBuildCommand call sites that need to produce a string now generate "cmake --build" commands. The remaining call sites immediately pass the result to cmSystemTools::RunSingleCommand. Avoid the intermediate string and argument parsing by directly producing a vector of strings. Also drop the ignoreErrors argument because no call sites remain that use it.
* | Refactor tool selection for edit_cache (#14544)Brad King2013-11-121-0/+7
| | | | | | | | | | | | | | | | | | Refactor edit_cache tool selection to ask each global generator for its preference. Teach the Ninja generator to always use cmake-gui because Ninja by design cannot run interactive terminal dialogs like ccmake. Teach the Makefile generator to use cmake-gui when also using an "extra" generator whose IDE has no terminal to run ccmake, and otherwise fall back to CMAKE_EDIT_COMMAND selection for normal Makefile build systems.
* | Merge topic 'ninja-use-deps'Brad King2013-10-281-5/+31
|\ \ | | | | | | | | | | | | eeb4aec Ninja: use deps = gcc/msvc feature
| * | Ninja: use deps = gcc/msvc featurePeter Kümmel2013-10-241-5/+31
| | | | | | | | | | | | cmcldeps is now only used for .rc file processing
* | | Drop the 'Full' field from cmDocumentationEntryBrad King2013-10-161-4/+0
|/ / | | | | | | | | We need only 'Brief' for usage documentation. We no longer have builtin 'Full' documentation, which is now in Help/*/*.rst files.
* | Add the INTERFACE_LIBRARY target type.Stephen Kelly2013-10-071-1/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | This target type only contains INTERFACE_* properties, so it can be used as a structural node. The target-specific commands enforce that they may only be used with the INTERFACE keyword when used with INTERFACE_LIBRARY targets. The old-style target properties matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for this target type. The name of the INTERFACE_LIBRARY must match a validity generator expression. The validity is similar to that of an ALIAS target, but with the additional restriction that it may not contain double colons. Double colons will carry the meaning of IMPORTED or ALIAS targets in CMake 2.8.13. An ALIAS target may be created for an INTERFACE library. At this point it can not be exported and does not appear in the buildsystem and project files are not created for them. That may be added as a feature in a later commit. The generators need some changes to handle the INTERFACE_LIBRARY targets returned by cmComputeLinkInterface::GetItems. The Ninja generator does not use that API, so it doesn't require changes related to that.
* Merge topic 'windows_ninja_duplicate_paths'Brad King2013-07-241-18/+22
|\ | | | | | | | | a11da72 Ninja: Properly convert all paths to unix style before we do set intersection.
| * Ninja: Properly convert all paths to unix style before we do set intersection.Robert Maynard2013-07-221-18/+22
| | | | | | | | | | | | On windows we had a subset of the paths as unix style and a subset as windows so when doing the set intersection it resulted in the same file being found twice.
* | OS X: Fix regression handling frameworks for NinjaClinton Stimpson2013-07-221-1/+7
|/ | | | | | | | | | Fix a regression created by commit 373faae5 (Refactor how bundles and frameworks are supported, 2013-05-05). Since the ninja file isn't aware of how framework symlinks work, we suppress symlink creation and let cmOSXBundleGenerator handle it. Also, use the real name of framework library in build rules as was done before, instead of the symlink.
* Ninja: Custom Command file depends don't need to exist before buildingRobert Maynard2013-07-011-3/+126
| | | | | | | | | | | | | | | When converting custom commands for the ninja build system we need to make sure that any file dependencies that exist in the build tree are converted to phony targets. This tells ninja that these files might not exist when starting the build, but could be generated during the build. This is done by tracking all dependencies for custom command targets. After all have been written out we remove all items from the set that have been seen as a target, custom command output, an alias, or a file in the source directory. Anything that is left is considered to be a file that will be generated as a side effect of another custom command.
* Ninja: GlobalNinjaGenerator WriteBuild and WritePhonyBuild non staticRobert Maynard2013-07-011-45/+45
| | | | | | To properly track the usage of dependencies that are generated at compile time as the side effect of other build steps we need to make the WriteBuild and WritePhonyBuild commands non static
* Ninja: Track configured files so we can regenerate them.Robert Maynard2013-06-251-0/+3
| | | | | Unlike the Makefile generator the ninja generator did not tack any of its output files, so if they are deleted the generator would not run.