summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* Ninja: Add 'restat' parameter to custom command generation methodBrad King2015-11-191-0/+1
| | | | Pass 'true' from all call sites to preserve existing behavior.
* cmake-gui: Add option to specify generator toolsetRobert Dailey2015-11-171-0/+6
| | | | | | | | | | The -T parameter to CMake may now be specified through cmake-gui via a new text field in the first-time configure wizard (below the generator chooser). The generator factories specify whether or not they support toolsets. This information is propagated to the Qt code and used to determine if the selected generator should also display the optional Toolset widgets.
* cmGlobalNinjaGenerator: Save 'ninja' version very earlyBrad King2015-11-021-1/+1
| | | | | Keep it in a member variable for convenient reference. Store the value as soon as it is known.
* cmGlobalNinjaGenerator: Save path to 'ninja' tool very earlyBrad King2015-11-021-1/+3
| | | | | Keep it in a member variable for convenient reference. Set the value as soon as it is known.
* Ninja: Port to cmGeneratorTarget.Stephen Kelly2015-10-241-5/+7
|
* Ninja: Centralize path conversion in global generator (#15757)Brad King2015-09-251-0/+13
| | | | | | | | | | | | | | | | | In the Ninja generator we run all build rules from the top of the build tree rather than changing into each subdirectory. Therefore we convert all paths relative to the HOME_OUTPUT directory. However, the Convert method on cmLocalGenerator restricts relative path conversions to avoid leaving the build tree with a "../" sequence. Therefore conversions performed for "subdirectories" that are outside the top of the build tree always use full paths while conversions performed for subdirectories that are inside the top of the build tree may use relative paths to refer to the same files. Since Ninja always runs rules from the top of the build tree we should convert them using only the top-level cmLocalGenerator in order to remain consistent. Also extend the test suite with a case that fails without this fix.
* cmLocalGenerator: Create from already-constructed cmMakefile.Stephen Kelly2015-08-281-1/+1
| | | | Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
* Ninja: Remove some incorrect comments adding no value.Stephen Kelly2015-08-281-11/+0
|
* cmLocalGenerator: Remove Parent pointer.Stephen Kelly2015-08-281-2/+1
|
* Merge topic 'rm-Makefile-LocalGenerator'Brad King2015-08-111-1/+1
|\ | | | | | | | | | | 1689c91d cmMakefile: Remove unused method. dd11f72c cmGlobalGenerator: Base exclusion computation on cmGeneratorTarget.
| * cmGlobalGenerator: Base exclusion computation on cmGeneratorTarget.Stephen Kelly2015-08-061-1/+1
| |
* | Ninja: Centralized required Ninja version numbers and comparisons.James Johnston2015-08-091-2/+4
|/
* Add common base classes to Makefile and Ninja generatorsBrad King2015-07-091-2/+2
| | | | Provide a place to move functionality common to both.
* cmLocalGenerator: Require a valid cmState::Snapshot in the ctor.Stephen Kelly2015-05-271-1/+2
| | | | | | | | | | | Refactor the local generator creation API to accept a cmState::Snapshot. Adjust MakeLocalGenerator to use the 'current' snapshot in cases where there is no parent. Create the snapshot for subdirectories in cmMakefile::AddSubdirectory. This means that snapshots are now created at the point of extending the tree, as appropriate, and independently of the cmLocalGenerator and cmMakefile they represent the state for.
* cmGlobalGenerator: Require a cmake instance in ctor.Stephen Kelly2015-05-271-2/+1
| | | | It is required anyway, so this makes it explicit.
* Ninja: Generate separate compile and link rules for each targetBrad King2015-05-181-1/+3
| | | | | | | | Our <LANG>_COMPILER and <LANG>_<TARGET_TYPE>_LINKER rule generation has access to a specific cmTarget so the results may depend on it. Instead generate separate rules for each target using an encoded target name. In particular, this makes CTEST_USE_LAUNCHERS report proper target information.
* Ninja: Use forward slashes for any GCC on Windows (#15439)Thomas Herz2015-05-071-2/+2
| | | | | Any GCC compiler on a Windows host needs forward slashes, not just those built for MinGW.
* Ninja: Refactor detection of MinGW tools on WindowsBrad King2015-05-071-7/+4
| | | | | | | | | | | Check for CMAKE_COMPILER_IS_MINGW only after enabling a language when it might actually be set. Previously this worked by accident because the check for working compiler or a second language enabled would cause the code path to be taken. Store UsingMinGW as an instance member of cmGlobalNinjaGenerator so that it is reset on each reconfigure. Otherwise cmake-gui cannot switch between build trees for MinGW or non-MinGW tools.
* cmLocalGenerator: Require a parent in the constructor.Stephen Kelly2015-04-281-1/+1
| | | | | | | Pass the parent though cmGlobalGenerator::CreateLocalGenerator. This will make it easy to initialize state scopes independent of cmMakefile.
* Ninja: Add policy to require explicit custom command byproductsBrad King2015-03-201-0/+5
| | | | | | | | | | | | Add policy CMP0058 to avoid generating 'phony' ninja rules for unknown custom command dependencies. This requires projects to specify their custom command byproducts explicitly. With this requirement we no longer have to assume that unknown custom command dependencies are generated and can instead simply assume they are source files expected to exist when the build starts. This is particularly important in in-source builds. It is also helpful for out-of-source builds to allow Ninja to diagnose missing files before running custom command rules that depend on them.
* cmGlobalNinjaGenerator: Drop unused memberBrad King2015-03-181-2/+0
|
* cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for NinjaGregor Jasny2015-02-261-1/+1
| | | | | | | | | The Ninja build system does not support a in-file verbositiy switch. Instead teach 'cmake --build' to extract the CMAKE_VERBOSE_MAKEFILE setting and pass it as an optional '-v' argument to Ninja. This can serve as a reasonable fallback. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* Ninja: Refactor restat to be a string internallyBrad King2014-11-141-2/+2
| | | | | 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/+1
|
* Ninja: factor out the test for console pool supportPeter Collingbourne2014-11-141-0/+3
|
* Fix some spelling errors in commentsGeoff Viola2014-10-131-1/+1
|
* Ninja: Use 'console' pool for CMake re-run if possible (#14915)Sylvain Joubert2014-10-031-1/+2
| | | | | | | | | 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.
* cmGlobalGenerator: Create a non-virtual 'DoGenerate' methodBrad King2014-07-221-3/+3
| | | | | | | Make the virtual 'Generate' method protected. Make 'DoGenerate' the main entry point to generation. This gives cmGlobalGenerator a chance to do some early operations before the individual generator-specific implementations take over.
* Ninja: Consider only custom commands deps as side-effects (#14972)Adam Strzelecki2014-06-301-4/+5
| | | | | | | | | | | | | | | | | 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.
* cmGlobalGenerator: Make ComputeTargetObjects non-virtualStephen Kelly2014-03-151-2/+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.
* cmGlobalGenerator: Extract a ComputeTargetObjectDirectory interface.Stephen Kelly2014-03-131-1/+1
| | | | Make it public for future external calls.
* stringapi: Use strings for program pathsBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for generator namesBen Boeckel2014-03-081-2/+2
|
* stringapi: Use strings for directoriesBen Boeckel2014-03-081-1/+1
|
* stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for VS project namesBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings in target nameBen Boeckel2014-03-081-1/+1
|
* cmGlobalGenerator: Make CheckALLOW_DUPLICATE_CUSTOM_TARGETS constStephen Kelly2014-01-121-1/+1
|
* Constify handling of target dependencies.Stephen Kelly2013-12-111-2/+2
|
* cmGlobalGenerator: Cleanup GenerateBuildCommand APIBrad King2013-11-181-8/+10
| | | | | | | | | 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/+1
| | | | | | | | | 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.
* Ninja: use deps = gcc/msvc featurePeter Kümmel2013-10-241-6/+9
| | | | cmcldeps is now only used for .rc file processing
* Ninja: Custom Command file depends don't need to exist before buildingRobert Maynard2013-07-011-0/+7
| | | | | | | | | | | | | | | 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-17/+17
| | | | | | 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
* Add projectDir parameter to GenerateBuildCommandPetr Kmoch2013-04-121-0/+1
| | | | | | | | Extend the cmGlobalGenerator::GenerateBuildCommand virtual method signature with a "projectDir" parameter specifying the top of the project build tree for which the build command will be generated. Populate it from call sites in cmGlobalGenerator::Build where a fully-generated build tree should be available.
* Make cmGlobalGenerator::GetDocumentation() a static functionPatrick Gansterer2012-11-191-1/+1
| | | | | Making the function static allows us to call it directly, without creating and removing an instance of the generator.
* Introduce the abstract class cmGlobalGeneratorFactoryPatrick Gansterer2012-11-191-2/+3
| | | | | This new abstract class allows us move some logic from the cmGlobalGenerator into its own layer in a next step.
* Ninja: don't confuse ninja's rsp files with nmake'sPeter Kümmel2012-09-281-0/+1
| | | | Move response files into CMakeFiles/ which makes them different to nmake's.
* Ninja: remove 'friend' in ninja codePeter Kümmel2012-07-181-52/+52
|
* Ninja: Copy resource files in the bundle.Nicolas Despres2012-07-171-0/+4
| | | | This patch fixes test BundleTest on Darwin.