summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* cmGlobalNinjaGenerator: Clarify logic for forcing use of response filesDmitry Ivanov2016-04-071-1/+1
| | | | | Update the WriteBuild method to use a negative command line length limit to specify that we should force use of response files.
* cmNinjaTargetGenerator: Factor out helper for forced response file checkDmitry Ivanov2016-04-071-3/+1
|
* Ninja: Add OS X dylib versioning (#14140)Bruce Stephens2016-03-071-0/+10
| | | | | | | | Teach the Ninja generator to add the `-current_version` and the `-compatibility_version` flags based on the VERSION and SOVERSION target properties just as the Makefile generators do. Signed-off-by: Bruce Stephens <bruce.r.stephens@gmail.com>
* 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)