summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-22/+11
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-5/+5
|
* cmScriptGenerator: pass Indent by valueDaniel Pfeifer2017-04-211-14/+12
|
* Replace boolean `implib` parameters with enumGregor Jasny2017-04-201-1/+4
| | | | | Named enumeration values are much clearer at call sites and add more type safety.
* Allow OBJECT libraries to be installed, exported, and importedRobert Maynard2017-04-181-0/+47
| | | | | | | | Teach install() and export() to handle the actual object files. Disallow this on Xcode with multiple architectures because it still cannot be cleanly supported there. Co-Author: Brad King <brad.king@kitware.com>
* cmInstallTargetGenerator: Re-order GenerateScriptForConfig logicBrad King2017-04-181-19/+22
| | | | | Do not populate some local variables before switching on the target type.
* clang-tidy: apply modernize-use-bool-literals fixesDaniel Pfeifer2016-12-121-1/+2
|
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-7/+6
|
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-22/+22
|
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-1/+9
|
* Honor BUNDLE_EXTENSION also for App Bundles (#16148)Gregor Jasny2016-07-221-2/+11
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-3/+3
|
* Prefer istringstream and ostringstream over stringstream.Daniel Pfeifer2016-06-141-1/+1
| | | | Use istringsream for parsing, ostringstream for generation.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-356/+245
| | | | | | | | | | | | | 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-18/+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.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-format tool can do a good job formatting most code, but well-organized streaming blocks are best left manually formatted. Find blocks of the form os << "...\n" "...\n" ; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}' Find blocks of the form os << "...\n" << "...\n" << "...\n"; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}' Surround such blocks with the pair /* clang-format off */ ... /* clang-format on */ in order to protect them from update by clang-format. Use the C-style `/*...*/` comments instead of C++-style `//...` comments in order to prevent them from ever being swallowed by re-formatting of surrounding comments.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge topic 'fix-target-alias-in-subdir'Brad King2016-04-051-1/+1
|\ | | | | | | | | | | 0e44f489 Rename local target lookup methods to clarify purpose bc30f8b5 Fix lookup of an ALIAS target outside aliased target's directory (#16044)
| * Rename local target lookup methods to clarify purposeBrad King2016-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | Rename methods: * `cmMakefile::Find{ => LocalNonAlias}Target` * `cmLocalGenerator::Find{ => LocalNonAlias}GeneratorTarget` These names clarify that they are for directory-local target names and do not consider alias targets.
* | install: Add EXCLUDE_FROM_ALL option (#14921)Nick Lewis2016-02-041-1/+3
|/ | | | | | | | | | | | | | | | | | | Let us take an example of a project that has some tests in a component that need to be installed into a dedicated test package. The user expectation is that the result could be achieved by typing the following: make make tests make install DESTDIR=/testpkgs make install-tests However this results in test components in the default installation as well as the testpkg. Add an EXCLUDE_FROM_ALL option to the install() command to tell it that the installation rule should not be included unless its component is explicitly specified for installation.
* install: Do not remove compiler-defined RPATH entriesLior Goldberg2016-01-151-12/+4
| | | | | | | | | | | | | | | | | | Some compilers may add their own RPATH entries when invoking the linker. For example, a GCC installation may contain the following definition in the specs file: *link_libgcc: %D -rpath <<some specific rpath in which libstdc++.so can be found>> In this case binaries may contain RPATH entries that CMake did not add. When we update the RPATH on installation we must preserve these entries even if CMake thinks the INSTALL_RPATH value should be empty. Fix this by always using file(RPATH_CHANGE) and teach it to behave as file(RPATH_REMOVE) if the actual RPATH in the file is empty after replacing the build-tree RPATH with the install-tree RPATH. This will preserve any compiler-added RPATH value instead of removing it.
* Xcode: Add support for combined install on iOSRuslan Baratov2015-12-101-0/+44
| | | | | | | | | | | | This patch solves the problem of installing both: Device and Simulator libraries on iOS. Before only one of them was installed. If the IOS_INSTALL_COMBINED property is set on a target, a special install hook will be activated which builds the corresponding target and combines both at the install location. The original patch was contributed by Ruslan Baratov, and polished by Gregor Jasny.
* iOS: Fix App Bundle layoutGregor Jasny2015-12-101-1/+7
| | | | In contrast to OS X the iOS App Bundle layout is a flat structure.
* Use cmLocalGenerator at generate-time.Stephen Kelly2015-10-241-2/+2
|
* cmInstallTargetGenerator: Get a cmGeneratorTarget directly.Stephen Kelly2015-10-241-2/+1
| | | | Extend the cmGeneratorTarget API to make this possible.
* cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget.Stephen Kelly2015-10-191-1/+1
|
* 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-2/+2
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmInstallTargetGenerator: Port GetInstallFilename to cmGeneratorTarget.Stephen Kelly2015-10-181-11/+8
|
* Remove now-obsolete casts.Stephen Kelly2015-10-141-2/+1
|
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-19/+19
| | | | | | | 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
* cmGeneratorExpression: Port to cmLocalGenerator.Stephen Kelly2015-10-121-1/+1
|
* cmGeneratorTarget: Move HasImplibGNUtoMS from cmTarget.Stephen Kelly2015-10-121-4/+4
|
* cmComputeLinkInformation: Port result API to cmGeneratorTarget.Stephen Kelly2015-10-121-10/+7
|
* Merge topic 'use-generator-target'Brad King2015-10-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| |
* | cmGeneratorTarget: Use local GetProperty method.Stephen Kelly2015-10-081-1/+1
|/
* cmGeneratorTarget: Move GetInstallNameDir* from cmTarget.Stephen Kelly2015-08-051-4/+7
|
* cmGeneratorTarget: Move IsChrPathUsed from cmTarget.Stephen Kelly2015-08-051-3/+2
|
* cmGeneratorTarget: Move NeedRelinkBeforeInstall from cmTarget.Stephen Kelly2015-08-051-1/+1
|
* cmGeneratorTarget: Move GetLibraryNames from cmTarget.Stephen Kelly2015-08-051-2/+2
|
* cmGeneratorTarget: Move GetExecutableNames from cmTarget.Stephen Kelly2015-08-051-2/+5
|
* cmGeneratorTarget: Move GetLinkInformation from cmTargetStephen Kelly2015-08-051-6/+4
|
* cmInstallTargetGenerator: Port to cmGeneratorTarget.Stephen Kelly2015-07-301-34/+44
|
* cmInstallCommand: Store only a targetName, not a cmTarget.Stephen Kelly2015-07-301-2/+10
| | | | Compute the cmTarget at Compute() time.
* cmInstallCommand: Move the SetHaveInstallRule invocation.Stephen Kelly2015-07-301-1/+0
| | | | | Remove the call from cmInstallTargetGenerator because that is to be ported away from cmTarget.
* cmInstallTargetGenerator: Re-arrange data layout.Stephen Kelly2015-06-071-1/+3
| | | | | | Remove unused cmGeneratorTarget member. Size goes from 238 to 232 bytes.
* Port to cmMakefile::GetGlobalGenerator.Stephen Kelly2015-05-031-4/+2
|