summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmGeneratorTarget: Add API for target-relative commands.Stephen Kelly2015-10-261-3/+3
|
* Ninja: Port to cmGeneratorTarget.Stephen Kelly2015-10-241-18/+18
|
* cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget.Stephen Kelly2015-10-191-2/+2
|
* cmGeneratorTarget: Copy IsAppBundleOnApple from cmTarget.Stephen Kelly2015-10-191-1/+1
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.Stephen Kelly2015-10-191-3/+3
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmLocalGenerator: Port some API to cmGeneratorTarget.Stephen Kelly2015-10-171-1/+1
|
* Use GetName from cmGeneratorTarget.Stephen Kelly2015-10-171-2/+3
|
* cmGeneratorTarget: Move GetTargetVersion from cmTarget.Stephen Kelly2015-10-161-1/+1
|
* cmState: Move GetTargetTypeName from cmTarget.Stephen Kelly2015-10-141-4/+3
|
* Remove now-obsolete casts.Stephen Kelly2015-10-141-2/+2
|
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-22/+22
| | | | | | | 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
* Generators: Use GetType from the cmGeneratorTarget.Stephen Kelly2015-10-141-6/+8
|
* cmGeneratorTarget: Move GetSupportDirectory from cmTarget.Stephen Kelly2015-10-121-4/+3
|
* cmGeneratorTarget: Move HasImportLibrary from cmTarget.Stephen Kelly2015-10-121-1/+1
|
* Merge topic 'use-generator-target'Brad King2015-10-121-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1c1c2a12 cmGeneratorTarget: Port ExpandLinkItems away from cmTarget. c66084f5 cmGeneratorTarget: Port GetImportLinkInterface away from cmTarget. 83c29e39 cmGeneratorTarget: Port ComputeLinkImplementationLibraries away from cmTarget. 19882554 cmGeneratorTarget: Port handleSystemIncludesDep away from cmTarget. c1f687b1 cmGeneratorTarget: Port GetLinkImplementationLibrariesInternal. a6e1f05c cmGeneratorTarget: Port ComputeLinkInterface away from cmTarget. 654002fe cmGeneratorTarget: Port ComputeLinkInterfaceLibraries away from cmTarget. 922c8901 cmGeneratorTarget: Port GetLinkInterface away from cmTarget. eaa5b9cb cmGeneratorTarget: Port cmTargetCollectLinkLanguages away from cmTarget. f539da12 cmGeneratorTarget: Port GetLinkInterfaceLibraries away from cmTarget. 1c5d70f9 cmGeneratorTarget: Port processILibs away from cmTarget. 064c2488 cmComputeLinkDepends: Port some API to cmGeneratorTarget. 3e428fdc cmGeneratorTarget: Move IsImportedSharedLibWithoutSOName from cmTarget. 110fd2fb cmGeneratorTarget: Move GetOutputTargetType from cmTarget. e7391699 cmGeneratorTarget: Move HasMacOSXRpathInstallNameDir from cmTarget. c5718217 cmGeneratorTarget: Move HaveInstallTreeRPATH from cmTarget. ...
| * cmGeneratorTarget: Move GetDirectory from cmTarget.Stephen Kelly2015-10-081-4/+4
| |
* | cmLocalGenerator: Add Home directory accessors.Stephen Kelly2015-10-081-2/+2
|/ | | | Reduce reasons for cmLocalGenerator to have a cmMakefile.
* Access sources through cmGeneratorTarget.Stephen Kelly2015-10-071-1/+1
|
* Merge topic 'minor-cleanups'Brad King2015-09-281-1/+0
|\ | | | | | | | | | | | | | | | | | | | | 51e48637 VS: Remove impossible condition. 203eada6 cmMakefile: Remove Configured state. 5642449a cmCommand: Remove IsDiscouraged interface. 77c6a339 cmSetCommand: Re-use local named variable. 732f5511 cmSetCommand: Fix typo in comment. 8544f16d cmGlobalGenerator: Devirtualize method. 9096daaf Ninja: Remove unused variable.
| * Ninja: Remove unused variable.Stephen Kelly2015-09-271-1/+0
| |
* | Ninja: Fix OBJECT_DIR placeholder substitution in link rulesBrad King2015-09-251-1/+3
|/ | | | | Convert the OBJECT_DIR value to the shell output format so that it is properly quoted when the path contains spaces.
* Add support for *.manifest source files with MSVC toolsBrad King2015-09-171-0/+3
| | | | | | | | Classify .manifest sources separately, add dependencies on them, and pass them to the MS manifest tool to merge with linker-generated manifest files. Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
* Ninja: Always add OBJECT_DIR variable to link rulesBrad King2015-09-171-3/+4
| | | | | The <OBJECT_DIR> placeholder is always available in Makefile generators so make it available from the Ninja generator too.
* cmGeneratorTarget: Move GetLinkerLanguage from cmTarget.Stephen Kelly2015-08-051-2/+1
|
* cmGeneratorTarget: Move GetInstallNameDir* from cmTarget.Stephen Kelly2015-08-051-1/+2
|
* cmGeneratorTarget: Move GetFullNameComponents from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move HasSOName from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move GetLibraryNames from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move GetExecutableNames from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* Merge topic 'ninja-implib-byproduct'Brad King2015-07-291-2/+3
|\ | | | | | | | | 35fb0bb8 Ninja: Make import libraries BYPRODUCTs instead of regular OUTPUTs
| * Ninja: Make import libraries BYPRODUCTs instead of regular OUTPUTsNils Gladitz2015-07-281-2/+3
| | | | | | | | | | | | | | | | | | The MSVC linker may update a binary without touching the associated import library. Making the import library a BYPRODUCT prevents the linker from unnecessarily rerunning when the import library does not get regenerated as previously expected.
* | Move GetFullPath to cmGeneratorTargetStephen Kelly2015-07-271-3/+4
| |
* | cmCustomCommandGenerator: Require cmLocalGenerator in API.Stephen Kelly2015-07-271-1/+1
|/
* Windows: Optionally generate DLL module definition files automaticallyBill Hoffman2015-07-061-0/+54
| | | | | | | Create target property WINDOWS_EXPORT_ALL_SYMBOLS to automatically generate a module definition file from MS-compatible .obj files and give it to the linker in order to export all symbols from the .dll part of a SHARED library.
* cmNinjaGenerator: Require cmGeneratorTarget.Stephen Kelly2015-06-221-1/+1
|
* Convert: Remove specification of default parameter.Stephen Kelly2015-05-201-2/+1
|
* Use cmSystemTools::GetCMakeCommand() to get path to cmake internallyBrad King2015-05-201-4/+2
| | | | | 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-6/+7
| | | | | | | | 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 linking with any GCC on Windows (#15439)Thomas Herz2015-05-081-1/+1
| | | | | Fix a condition forgotten by commit b3de0dfe (Ninja: Use forward slashes for any GCC on Windows, 2015-05-07).
* Ninja: Do not use newlines in response files with Windows GNU tools (#15439)Thomas Herz2015-05-071-1/+6
| | | | | | | | Since commit v2.8.11~213^2 (Ninja: Avoid LNK1170 linker error, 2013-02-01) we generate linker response files with "$in_newline" to support a large number of object files with the MS link.exe tool. However, the GNU linker on Windows does not understand the newline endings that Ninja puts in the response files. Switch back to "$in" for that case.
* Include cmAlgorithms where it is used.Stephen Kelly2015-03-101-0/+1
|
* Merge topic 'ninja-rsp_file-calculation'Brad King2015-01-261-7/+22
|\ | | | | | | | | 097e26f4 ninja: use the minimum of all command line length limits (#14892)
| * ninja: use the minimum of all command line length limits (#14892)Ben Boeckel2015-01-231-7/+22
| | | | | | | | | | | | When choosing whether to use a response file, consider several possible command line length limits for the current operating system, and choose the smallest.
* | Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-5/+5
| | | | | | | | All compilers hosting CMake support the std class.
* | Merge topic 'ninja-fix-subdir-objlib-languages'Brad King2014-12-241-2/+15
|\ \ | |/ | | | | | | | | 07fc7b75 Tests: Test using objects from a language enabled in a subdirectory (#15325) fdbfcfdf Ninja: Generate rules only for languages compiled in a target (#15325)
| * Ninja: Generate rules only for languages compiled in a target (#15325)Brad King2014-12-231-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit v3.1.0-rc1~688^2~2 (cmTarget: Compute languages from object libraries on demand, 2014-03-18) taught cmTarget::GetLanguages to (correctly) include the languages of object library sources. Previously this was done only in cmTarget::ComputeLinkImplementationLanguages to choose the linker language. The Ninja generator writes out generic build rules for each language compiled within a target using the rule variables defined in the directory of the target. This only needs to be done for languages actually compiled within the current target. Switch from using the cmTarget::GetLanguages method to get the list of languages over to using cmTarget::GetSourceFiles directly so we do not get the languages in object libraries. Strictly speaking this should make no difference because it is not safe to use objects from a language not enabled in the directory containing a target or else the link information for the language may not be considered. However, in cases when no link information happens to be needed for a language it was possible in CMake 3.0 and below to enable a language only in a subdirectory providing an object library, and then use the objects from a containing directory. The above change teaches the Ninja generator to continue working in this case.
* | Add an option for explicit BYPRODUCTS of custom commands (#14963)Brad King2014-11-141-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common idiom in CMake-based build systems is to have custom commands that generate files not listed explicitly as outputs so that these files do not have to be newer than the inputs. The file modification times of such "byproducts" are updated only when their content changes. Then other build rules can depend on the byproducts explicitly so that their dependents rebuild when the content of the original byproducts really does change. This "undeclared byproduct" approach is necessary for Makefile, VS, and Xcode build tools because if a byproduct were listed as an output of a rule then the rule would always rerun when the input is newer than the byproduct but the byproduct may never be updated. Ninja solves this problem by offering a 'restat' feature to check whether an output was really modified after running a rule and tracking the fact that it is up to date separately from its timestamp. However, Ninja also stats all dependencies up front and will only restat files that are listed as outputs of rules with the 'restat' option enabled. Therefore an undeclared byproduct that does not exist at the start of the build will be considered missing and the build will fail even if other dependencies would cause the byproduct to be available before its dependents build. CMake works around this limitation by adding 'phony' build rules for custom command dependencies in the build tree that do not have any explicit specification of what produces them. This is not optimal because it prevents Ninja from reporting an error when an input to a rule really is missing. A better approach is to allow projects to explicitly specify the byproducts of their custom commands so that no phony rules are needed for them. In order to work with the non-Ninja generators, the byproducts must be known separately from the outputs. Add a new "BYPRODUCTS" option to the add_custom_command and add_custom_target commands to specify byproducts explicitly. Teach the Ninja generator to specify byproducts as outputs of the custom commands. In the case of POST_BUILD, PRE_LINK, and PRE_BUILD events on targets that link, the byproducts must be specified as outputs of the link rule that runs the commands. Activate 'restat' for such rules so that Ninja knows it needs to check the byproducts, but not for link rules that have no byproducts.
* | Ninja: Refactor restat to be a string internallyBrad King2014-11-141-3/+3
| | | | | | | | | | This will allow values other than "" and "1" to be generated in the rules.ninja file.
* | Ninja: Use a TARGET_FILE variable to hold the link output fileBrad King2014-11-141-18/+11
| | | | | | | | | | | | Use an explicit "$TARGET_FILE" variable instead of "$out" so that we can have multiple output files while still only referencing the main one in command lines.
* | strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-6/+6
|/ | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.