summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkDepends.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-2/+2
|
* 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 batch of include-what-you-use violationsDaniel Pfeifer2016-08-231-0/+9
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-3/+3
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-279/+176
| | | | | | | | | | | | | 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-25/+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-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>
* Make cmLinkInterface:: and cmGeneratorTarget::Multiplicity unsigned intsChristoph GrĂ¼ninger2016-02-041-1/+1
|
* Move ComputeLinkType out of cmTarget.Stephen Kelly2015-10-201-1/+3
| | | | | Keep it out of the way, so that it does not become part of cmGeneratorTarget, but where it can be used to implement CMP0003.
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-2/+2
| | | | | | | 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
* cmTarget: Move link type enum out.Stephen Kelly2015-10-141-8/+8
| | | | Remove a reason for generate time code to depend on the cmTarget header/type.
* cmLinkItem: Port to cmGeneratorTarget.Stephen Kelly2015-10-121-7/+3
|
* cmGeneratorTarget: Move FindTargetToLink from cmTarget.Stephen Kelly2015-10-121-3/+4
|
* cmComputeLinkDepends: Port result API to cmGeneratorTarget.Stephen Kelly2015-10-121-1/+2
|
* cmGeneratorTarget: Port GetLinkInterface away from cmTarget.Stephen Kelly2015-10-101-3/+3
|
* cmComputeLinkDepends: Port some API to cmGeneratorTarget.Stephen Kelly2015-10-101-16/+14
|
* Merge topic 'use-generator-target'Brad King2015-08-271-9/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c2b7336f cmGeneratorTarget: Move GetConfigCommonSourceFiles from cmTarget. 69329fff cmGeneratorTarget: Move GetLanguages from cmTarget. 0431f2c4 cmGeneratorTarget: Move ComputeLinkImplementationLanguages from cmTarget. abe9505d cmGeneratorTarget: Move HaveBuildTreeRPath from cmTarget. d4a24c0e cmGeneratorTarget: Move GetLinkImplementation from cmTarget. 83981cf5 cmTarget: Add GetLinkImplMap method. 771e79a2 cmLinkItem: Add cmOptionalLinkImplementation type. 3846ebcf cmLinkItem: Add cmLinkImplementation type. a7f5d70d cmGeneratorTarget: Move compile defintions processing from cmTarget. d051086c cmGeneratorTarget: Move compile features processing from cmTarget. db4cb92b cmGeneratorTarget: Move compile options processing from cmTarget. e6ccbf6f cmGeneratorTarget: Move include directory processing from cmTarget. 8bfb0c53 cmGeneratorTarget: Move link iface helpers from cmTarget. 2cb3e574 cmGeneratorTarget: Move GetImportLinkInterface from cmTarget. 6d3d099b cmGeneratorTarget: Move ComputeLinkInterfaceLibraries from cmTarget. 0db9d927 cmGeneratorTarget: Move GetLinkInterfaceLibraries from cmTarget. ...
| * cmGeneratorTarget: Move GetLinkImplementation from cmTarget.Stephen Kelly2015-08-261-1/+1
| |
| * cmLinkItem: Add cmLinkImplementation type.Stephen Kelly2015-08-261-1/+1
| |
| * cmGeneratorTarget: Move GetLinkInterface from cmTarget.Stephen Kelly2015-08-261-3/+9
| |
| * cmTarget: Move link interface libraries struct out.Stephen Kelly2015-08-261-4/+4
| |
* | Reduce uses of cmMakefile::GetGlobalGenerator.Stephen Kelly2015-08-251-1/+3
|/ | | | Don't assume the cmMakefile has a global generator.
* Remove use of include <cmsys/stl/*> and cmsys_stl::*Brad King2015-08-201-2/+0
| | | | We no longer need this compatibility layer for the compilers we support.
* cmComputeLinkDepends: Port to cmGeneratorTarget.Stephen Kelly2015-08-051-8/+9
|
* cmComputeLinkDepends: Remove unused local generator.Stephen Kelly2015-05-031-3/+1
|
* Include cmAlgorithms where it is used.Stephen Kelly2015-03-101-0/+1
|
* Convert some raw loops to cmWrap.Stephen Kelly2015-02-201-4/+1
|
* cmComputeLinkDepends: Remove temporary iterator copy.Stephen Kelly2015-02-061-2/+1
|
* Remove use of cmsys_stl.Stephen Kelly2015-02-051-3/+3
| | | | It is not needed.
* Convert raw loops to vector member insert.Stephen Kelly2015-01-181-5/+2
|
* Use the cmDeleteAll algorithm instead of trivial raw loops.Stephen Kelly2015-01-131-6/+1
|
* Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | All compilers hosting CMake support the std class.
* | Revert "Misc. fixes for the Oracle / Sun compiler."Stephen Kelly2015-01-111-3/+2
|/ | | | This reverts commit 97b65f8156734db2adc367b27c822a5fe332d740.
* Misc. fixes for the Oracle / Sun compiler.Chuck Atkins2014-12-121-2/+3
| | | | | | A few pieces of code have some ambiguous type deduction that seems to resolve correctly for most compilers but not for the Oracle compiler. This makes those few instances more explicit.
* Fix link line order when shared libraries are de-duplicatedDaniele E. Domenichelli2014-11-101-4/+9
| | | | | | | | | | | | | | | | | | | | Since commit v3.1.0-rc1~227^2~1 (De-duplicate shared library targets in generated link lines, 2014-07-30) we de-duplicate shared library targets on the link line. However, some toolchains will fail linking if an executable is linking to a shared library that is not used directly and a static library that depends on the shared one. The linker may not keep the reference to the shared library the first time and then the symbols needed by the static library may not be found. Fix this by reversing the direction of the for loop that removes the duplicate shared libraries, in order to ensure that the last occurrence of the library is left instead of the first one. Extend Tests/Dependency with a case covering this behavior. Create an executable that links to a shared library and a static library but only needs the shared library as a dependency of the static library. Co-Author: Brad King <brad.king@kitware.com>
* De-duplicate shared library targets in generated link linesBrad King2014-07-301-2/+13
| | | | | | | | | | The linker will bring in shared libraries as a whole and use them even for symbols that are needed by entries later in the link line. Therefore we do not need to repeat them. De-duplicate link entries that we know are shared libraries because we have a cmTarget associated with them. Tested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
* cmComputeLinkDepends: Convert AddLinkEntries to a templateBrad King2014-07-071-2/+3
| | | | | Allow the method to be called with a vector of any type that can be converted to cmLinkItem.
* cmTarget: Lookup targets in LinkInterface and LinkImplementationBrad King2014-06-231-24/+22
| | | | | | | | | | | | | | | Instead of storing just the string names in these structures, lookup any target associated with each item and store its cmTarget pointer. Use the cmLinkItem class to hold the name and pointer together. Update client sites to use the pre-stored lookup result instead of looking up the target name again. Create a cmTarget::LookupLinkItems helper method to handle the lookup. Since lookups are now moving from cmComputeLinkDepends::AddLinkEntries to cmTarget::LookupLinkItems, move use of CheckCMP0004 to the latter. This drops use of CheckCMP0004 from entries added for _LIB_DEPENDS variables by cmComputeLinkDepends::AddVarLinkEntries, but I do not think that use was intentional originally anyway.
* cmTarget: Add method to lookup other targets in a target's scopeBrad King2014-06-231-28/+3
| | | | | Move the main implementation of cmComputeLinkDepends::FindTargetToLink into cmTarget.
* cmTarget: Remove 'head' argument from GetLinkImplementationBrad King2014-06-231-1/+1
| | | | | | | | | | | | | Many of the 'head' arguments added by commit v2.8.11~289^2~1 (Make linking APIs aware of 'head' target, 2013-01-04) turned out not to be needed. The "link implementation" of a target never needs to be computed with anything but itself as the 'head' target (except for CMP0022 OLD behavior because then it is the link interface). Remove the unused 'head' target paths. Add "internal" versions of cmTarget::GetDirectLinkLibraries and GetLinkImplementationLibraries to support the CMP0022 OLD behavior without otherwise exposing the 'head' target option of these methods.
* cmComputeLinkInformation: Remove 'head' argumentBrad King2014-06-231-7/+5
| | | | | | It is only ever constructed with the current target as its own 'head'. Co-Author: Stephen Kelly <steveire@gmail.com>
* cmComputeLinkDepends: Simplify CheckWrongConfigItem implementationBrad King2014-06-231-6/+3
| | | | Combine the outer two if() conditions into a single one with &&.
* Remove some c_str() calls.Stephen Kelly2014-03-111-5/+5
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-3/+4
|
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-5/+5
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* stringapi: Use strings in target nameBen Boeckel2014-03-081-4/+5
|
* Constify handling of link targets.Stephen Kelly2013-12-111-5/+6
|
* cmTarget: Make GetProperty() const.Stephen Kelly2013-10-311-1/+2
| | | | | | This has follow-on effects for other methods and classes. Further work on making the use of const cmTarget pointers common can be done, particularly with a view to generate-time methods.