summaryrefslogtreecommitdiff
path: root/Source/cmGlobalNinjaGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmGeneratorTarget: Add GetUtilities APIStephen Kelly2015-10-271-1/+1
|
* Ninja: Port to cmGeneratorTarget.Stephen Kelly2015-10-241-13/+10
|
* Use cmLocalGenerator at generate-time.Stephen Kelly2015-10-241-2/+2
|
* cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.Stephen Kelly2015-10-191-2/+3
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* Merge topic 'clean-up-cmTarget'Brad King2015-10-161-9/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | 55474e61 cmState: Move GetTargetTypeName from cmTarget. 38df5c36 Remove now-obsolete casts. 4ee2b267 cmGeneratorTarget: Use enum for GetType. eac15298 cmState: Move TargetType enum from cmTarget. 482b3811 cmTarget: Move link type enum out. 2ee1cb85 cmTarget: Move ImportInfoMap out of internal class. a48bcabd cmTarget: Move backtrace member out of internal class. 6694d993 cmTarget: Remove unneeded constructors. 983c00f8 Generators: Use GetType from the cmGeneratorTarget.
| * cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-151-9/+9
| | | | | | | | | | | | | | Mostly automated: values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType") for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
* | cmLocalGenerator: Port GetTargetDirectory to cmGeneratorTarget.Stephen Kelly2015-10-151-3/+1
|/
* cmLocalGenerator: Add Home directory accessors.Stephen Kelly2015-10-091-3/+2
| | | | Reduce reasons for cmLocalGenerator to have a cmMakefile.
* Ninja: Centralize path conversion in global generator (#15757)Brad King2015-09-251-14/+19
| | | | | | | | | | | | | | | | | 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-2/+2
| | | | Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
* cmLocalGenerator: Remove Parent pointer.Stephen Kelly2015-08-281-3/+2
|
* Ninja: Prevent generating if installed Ninja version is too old.James Johnston2015-08-091-0/+12
|
* Ninja: Centralized required Ninja version numbers and comparisons.James Johnston2015-08-091-3/+4
|
* Merge topic 'use-generator-target'Brad King2015-08-061-3/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a309409e cmOrderDirectories: Port to cmGeneratorTarget. f83e8402 cmGeneratorTarget: Move CompileInfoMap from cmTarget. b3f0e353 cmGeneratorTarget: Move GetCompilePDBDirectory from cmTarget. 34c43741 cmGeneratorTarget: Move GetOutputName from cmTarget. 4329a71c cmComputeLinkDepends: Port to cmGeneratorTarget. c93230ac cmComputeLinkInformation: Port to cmGeneratorTarget. ee26add4 cmGeneratorTarget: Move IsBundleOnApple from cmTarget. c8a5f5ae cmMakefileTargetGenerator: Add accessor for GeneratorTarget. f8076644 cmGeneratorTarget: Move GetLinkClosure from cmTarget. 7c809fa2 cmGeneratorTarget: Move GetLinkerLanguage from cmTarget. 6da99de3 cmGeneratorTarget: Move GetFrameworkDirectory from cmTarget. d6bb319b cmGeneratorTarget: Move GetFullName from cmTarget. 7a460852 cmGeneratorTarget: Move GetAppBundleDirectory from cmTarget. d560bfd2 cmGeneratorTarget: Move GetInstallNameDir* from cmTarget. 89e2a080 cmGeneratorTarget: Move GetMacContentDirectory from cmTarget. 62720e44 cmGeneratorTarget: Move GetFullNameComponents from cmTarget. ...
| * cmGlobalNinjaGenerator: Simplify usage of API.Stephen Kelly2015-08-041-3/+1
| |
* | cmMakefile: Store EvaluationFiles.Stephen Kelly2015-08-011-14/+12
|/ | | | | Relieve the cmGlobalGenerator of this responsibility. Evaluate the generator expressions in the context of the cmLocalGenerator.
* Move GetFullPath to cmGeneratorTargetStephen Kelly2015-07-271-2/+6
|
* Add common base classes to Makefile and Ninja generatorsBrad King2015-07-091-1/+1
| | | | Provide a place to move functionality common to both.
* cmComputeTargetDepends: Change API to use cmGeneratorTarget.Stephen Kelly2015-07-011-3/+3
|
* Merge topic 'inject-state-snapshot'Brad King2015-05-271-5/+6
|\ | | | | | | | | | | | | | | 3b880a07 cmLocalGenerator: Require a valid cmState::Snapshot in the ctor. e12afe76 cmState: Host some state from the cmGlobalGenerator. c7b79aa1 cmGlobalGenerator: Require a cmake instance in ctor. 01e1cd5c cmState: Move snapshot creation to the cmake instance.
| * cmLocalGenerator: Require a valid cmState::Snapshot in the ctor.Stephen Kelly2015-05-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | 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.
| * cmState: Host some state from the cmGlobalGenerator.Stephen Kelly2015-05-271-1/+1
| |
| * cmGlobalGenerator: Require a cmake instance in ctor.Stephen Kelly2015-05-271-2/+2
| | | | | | | | It is required anyway, so this makes it explicit.
* | Merge topic 'ninja-per-target-rules'Brad King2015-05-271-1/+0
|\ \ | |/ |/| | | | | 9da84ab6 Ninja: Fix regression in .rsp file support
| * Ninja: Fix regression in .rsp file supportBrad King2015-05-261-1/+0
| | | | | | | | | | | | | | | | | | | | In commit a390de65 (Ninja: Generate separate compile and link rules for each target, 2015-05-18) we removed the _RSP_FILE suffix from rule names meant for targets that need to build with a .rsp file because we now use per-target rules anyway. Remove this suffix from references to the rule too. Reported-by: Herz Thomas <Thomas.Herz@kuka.com>
* | Use cmSystemTools::GetCMakeCommand() to get path to cmake internallyBrad King2015-05-201-7/+4
|/ | | | | This is much simpler than finding a way to lookup "CMAKE_COMMAND" everywhere.
* Ninja: Generate separate compile and link rules for each targetBrad King2015-05-181-1/+31
| | | | | | | | 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.
* cmGlobalGenerator: Move some flags from cmLocalGenerator.Stephen Kelly2015-05-141-0/+3
| | | | | These flags are global, and so they belong here instead of being set on each local generator.
* cmLocalGenerator: Require a global generator in the constructor.Stephen Kelly2015-05-141-3/+1
| | | | Port generator factory methods to pass it.
* Ninja: Use forward slashes for any GCC on Windows (#15439)Thomas Herz2015-05-071-4/+8
| | | | | 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-13/+11
| | | | | | | | | | | 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.
* RC: Simplify selection of resource compiler based on C/C++ toolchainBrad King2015-05-071-1/+0
| | | | | | | | | | Revert the refactoring by commit v2.8.11~105^2~1 (Ninja: use MinGW generator code in EnableLanguage, 2013-03-09) and move the MinGW- specific logic back to the "MinGW Makefiles" generator. Instead teach the platform information modules for GNU and MSVC on Windows to set the preferred RC compiler just before enabling the RC language. This way we choose the RC compiler based on the C/C++ toolchain that is actually enabled.
* Port to static cmPolicies API.Stephen Kelly2015-05-041-3/+1
|
* cmLocalGenerator: Require a parent in the constructor.Stephen Kelly2015-04-281-2/+3
| | | | | | | Pass the parent though cmGlobalGenerator::CreateLocalGenerator. This will make it easy to initialize state scopes independent of cmMakefile.
* Merge topic 'clean-up-cmMakefile'Brad King2015-04-211-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8dc3a67c cmMakefile: Out-of-line the directory methods. 0f3c8cfa cmMakefile: Use method abstraction to access directories. b288a997 cmMakefile: Rename SetStart* directory API to SetCurrent*. 932d53bc cmMakefile: Remove redundant method duplication. 32b8f03a cmMakefile: Port users of GetStart* methods to new names. 54d6a918 cmMakefile: Rename GetCurrent{Output,Binary}Directory. 55d80d0a cmMakefile: Rename GetCurrent{,Source}Directory. b23cf06f cmake: Remove redundant start directories. fcf246ac cmMakefile: Populate Home directories on initialize. 8878bea7 cmake: Initialize Home directories on cmake for find-package mode. 044dc815 Use the Home directories from the cmake class where intended. d67e8f24 cmake: Fix directory used to find the cache 1ea085d1 cmMakefile: Initialize dir definitions early. f034bb2f Remove redundant calls to MakeStartDirectoriesCurrent. 3a68c323 cmMakefile: Fix wrong parameter names.
| * cmMakefile: Port users of GetStart* methods to new names.Stephen Kelly2015-04-211-1/+1
| |
| * cmMakefile: Rename GetCurrent{Output,Binary}Directory.Stephen Kelly2015-04-211-1/+1
| | | | | | | | Match names used in CMake code.
* | cmSystemTools: Teach RunSingleCommand to separate stdout and stderrBrad King2015-04-201-1/+1
|/ | | | | | | Extend the RunSingleCommand signature to capture stdout and stderr separately. Allow both to be captured to the same std::string to preserve existing behavior. Update all call sites to do this so that this refactoring does not introduce functional changes.
* Merge topic 'add-GreenHills-MULTI-generator'Brad King2015-04-201-0/+1
|\ | | | | | | | | | | | | 66b641f4 Help: Add notes for topic 'add-GreenHills-MULTI-generator' 48004d9d Add a 'Green Hills MULTI' generator on Windows 051d8be1 cmLocalGenerator: Constify some cmTarget and cmGeneratorTarget arguments
| * Add a 'Green Hills MULTI' generator on WindowsGeoff Viola2015-04-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Green Hills MULTI is an IDE for embedded real-time systems. The IDE's product page can be found here: http://www.ghs.com/products/MULTI_IDE.html It supports cross compiling on ARM, Intel x86, and other architectures with various operating systems. The IDE exists on Linux and Windows host systems, but CMake will currently only generate the project files on Windows host systems.
* | Ninja: Drop 'experimental' label in documentationBrad King2015-04-141-1/+1
|/ | | | | This generator is no longer experimental and has been fairly mature for several releases already.
* Ninja: Add policy to require explicit custom command byproductsBrad King2015-03-201-6/+55
| | | | | | | | | | | | 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: Optimize handling of known build outputsBrad King2015-03-201-10/+7
| | | | | | | Teach WriteUnknownExplicitDependencies to take ownership of the set of WriteBuild outputs immediately since no other methods need the data. This avoids re-inserting the whole set into another already populated set.
* cmGlobalNinjaGenerator: Fix spelling of "unknown"Brad King2015-03-201-4/+4
|
* Ninja: Do not generate circular phony rules (#15454)Brad King2015-03-181-1/+1
| | | | | | | | | | | | | | | | | The phony rules added by commit v2.8.12~248^2 (Ninja: Custom Command file depends don't need to exist before building, 2013-06-07) are circular, e.g. build side-effect: phony side-effect This is not diagnosed by Ninja as of version 1.5, but the dependency does not make sense. Simply drop it and use phony rules of the form build side-effect: phony instead. Reported-by: Daniel Dunbar
* cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for NinjaGregor Jasny2015-02-261-0/+6
| | | | | | | | | 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>
* 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.