summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'ninja-no-accidental-rsp'Brad King2016-07-181-1/+1
|\ | | | | | | | | 86dd2427 Ninja: Do not force response files when no sysconf(3) limit is used
| * Ninja: Do not force response files when no sysconf(3) limit is usedBrad King2016-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | Commit v3.6.0-rc1~174^2~1 (cmGlobalNinjaGenerator: Clarify logic for forcing use of response files, 2016-04-06) started using negative command line length values to represent forced use of response files but forgot to update `calculateCommandLineLengthLimit()` accordingly. Teach it to return `0` instead of `-1` when no limit is computed from the system to avoid forcing response files. Reported-by: Raphael Kubo da Costa <rakuco@FreeBSD.org>
* | Ninja: Generalize check for sysconf(3) callRaphael Kubo da Costa2016-07-151-1/+1
| | | | | | | | | | | | | | Use `sysconf(_SC_ARG_MAX)` wherever `_SC_ARG_MAX` is available instead of hard-coding an incomplete list of operating systems that implement it. In particular, it is available on BSD platforms that were not previously listed.
* | Windows: Honor WINDOWS_EXPORT_ALL_SYMBOLS for executables with exportsYury Zhuravlev2016-07-111-2/+4
| | | | | | | | | | For executables with ENABLE_EXPORTS set, export all symbols when instructed to do so by WINDOWS_EXPORT_ALL_SYMBOLS.
* | use CM_NULLPTRDaniel Pfeifer2016-06-281-1/+1
| |
* | Merge topic 'link_what_you_use'Brad King2016-06-171-2/+22
|\ \ | | | | | | | | | | | | | | | a0902efa Help: Add notes for topic 'link_what_you_use' 96242f80 Add options to run `ldd -u -r` as a "link-what-you-use" tool
| * | Add options to run `ldd -u -r` as a "link-what-you-use" toolBill Hoffman2016-06-171-2/+22
| |/ | | | | | | | | | | | | Create a LINK_WHAT_YOU_USE target property and corresponding CMAKE_LINK_WHAT_YOU_USE variable to enable this behavior. Extend link commands by running `ldd -u -r` to detect shared libraries that are linked but not needed.
* | Add missing braces around statements.Daniel Pfeifer2016-06-101-6/+9
| | | | | | | | | | Apply fixits of clang-tidy's readability-braces-around-statements checker.
* | Merge topic 'ninja-no-ranlib-windows'Brad King2016-06-091-0/+15
|\ \ | | | | | | | | | | | | ea598671 Run ranlib on archives only if the tool is available
| * | Run ranlib on archives only if the tool is availableBrad King2016-06-081-0/+15
| |/ | | | | | | | | | | | | | | | | | | | | | | | | CMakeFindBinUtils sets CMAKE_RANLIB to `:` if it is not available in order to get a no-op. This does not work on a Windows host build environment that runs commands in `cmd` instead of `sh`. Teach the Ninja and Makefile generators to simply skip the command if it is `:`. This this was already done by the Makefile generator since commit v2.6.0~3161 (BUG: Do not write link script lines that use the ':', 2006-06-18), but only when using a link script. Reported-by: Michael Jäntsch <Michael.Jaentsch@gmx.de>
* | cmLocalGenerator: Pass configuration to GetTargetFlagsTobias Hunger2016-06-081-3/+3
|/ | | | | Move the configuration lookup to call sites. This will allow multi-configuration callers to use the method.
* Remove redundant c_str() calls.Daniel Pfeifer2016-05-261-3/+3
| | | | | Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
* Use enums defined in cmOutputConverter using their fully qualified name.Daniel Pfeifer2016-05-251-11/+11
| | | | | | | | | Mostly automated: values=("RelativeRoot" "NONE" "FULL" "HOME" "START" "HOME_OUTPUT" "START_OUTPUT" "OutputFormat" "UNCHANGED" "MAKERULE" "SHELL" "WATCOMQUOTE" "RESPONSE" "FortranFormat" "FortranFormatNone" "FortranFormatFixed" "FortranFormatFree") for i in "${values[@]}"; do git grep -l cmLocalGenerator::$i | xargs sed -i "s|cmLocalGenerator::$i|cmOutputConverter::$i|g"; done
* Ninja: Fix path to soname-d target fileNicolas Despres2016-05-171-1/+2
| | | | | In WriteLinkStatement we convert all target output paths to ninja-style paths. Add a missing conversion for the `soname` file name.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-352/+239
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* 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
|