summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Makefile: For static libraries remove only the "real" lib before creatingGregor Jasny2017-01-261-13/+14
| | | | | | | When creating a static library with the archive tool, only the `.a` needs to be removed to start a fresh archive. Any other files (e.g. symbolic links we may later add) are not managed by the archive tool and therefore do not need to be cleaned.
* Makefile: Re-order list of files to cleanGregor Jasny2017-01-261-4/+4
| | | | | Revise construction of the list of files to be cleaned for the target to list the "real" file first.
* CUDA: Populate compiler PDB placeholder during device linkingBrad King2017-01-121-0/+6
| | | | | The device link step runs the host compiler internally so we need to use the proper compiler PDB file with MSVC.
* CUDA: Use `.obj` object file extension on WindowsBrad King2017-01-121-1/+3
|
* CUDA: Add separable compilation support to the makefile generator.Robert Maynard2016-11-141-0/+222
|
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-3/+8
|
* cmListFileCache: Remove cmState header includeStephen Kelly2016-10-191-0/+1
| | | | | Include it in dependents which have previously relied on it transitively.
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-17/+17
|
* cmRulePlaceholderExpander: Port clients to direct-useStephen Kelly2016-10-151-11/+13
| | | | | | Add a factory function to cmLocalGenerator so that variableMappings can be provided from it, and so that Ninja can always have a hard-coded TargetImpLib.
* cmLocalGenerator: Use strings instead of a Target in rule replacementStephen Kelly2016-10-151-1/+3
| | | | Don't rely on the cmGeneratorTarget type needlessly.
* cmLocalGenerator: Use a converter in rule replacement APIStephen Kelly2016-10-151-4/+8
| | | | | | | The rule replacement API should not really be in cmLocalGenerator, but it was historically, and this coupled many other things together here too, such as output conversion. Make the output converter a parameter so that rule replacement can be removed from cmLocalGenerator.
* cmLocalGenerator: Remove the launcher from RuleVariablesStephen Kelly2016-10-151-4/+12
| | | | | | | | | This one is not like the others as it doesn't participate in substitutions. Keep ExpandRuleVariables doing only one thing and make callers responsible for inserting a launcher prefix, simplifying the code all-around. Remove now-obsolete InsertRuleLauncher method.
* Merge topic 'LINK_WHAT_YOU_USE-allow-OFF'Brad King2016-10-141-2/+2
|\ | | | | | | | | | | | | 2f79b22c Merge branch 'backport-LINK_WHAT_YOU_USE-allow-OFF' into LINK_WHAT_YOU_USE-allow-OFF 33cb0173 Honor LINK_WHAT_YOU_USE when set to OFF 933e54d3 Honor LINK_WHAT_YOU_USE when set to OFF
| * Honor LINK_WHAT_YOU_USE when set to OFFJamie Snape2016-10-131-2/+2
| | | | | | | | | | | | Explicitly setting variable CMAKE_LINK_WHAT_YOU_USE or property LINK_WHAT_YOU_USE to OFF should not cause LWYU to run. Fix the property lookup to use GetPropertyAsBool.
* | Merge topic 'remove-obsolete'Brad King2016-10-131-17/+0
|\ \ | |/ |/| | | | | | | b6a174d2 Makefiles: Remove query for CMAKE_OBJECT_NAME d0faa58a Makefiles: Remove forbidden flag logic
| * Makefiles: Remove forbidden flag logicStephen Kelly2016-10-091-17/+0
| | | | | | | | This might have been needed some day in the past, but not anymore.
* | cmLinkLineComputer: Move FrameworkPath computation from cmLocalGeneratorStephen Kelly2016-10-101-1/+1
| | | | | | | | Add UseWatcomQuote state, and remove corresponding method parameters.
* | cmLinkLineComputer: Move RPath computation from cmLocalGeneratorStephen Kelly2016-10-101-1/+2
| | | | | | | | | | | | Add state for Relink and populate it at the point of cmLinkLineComputer initialization. This allows removal of the parameter in go-between methods.
* | cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGeneratorStephen Kelly2016-10-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a cmOutputConverter to the cmLinkLineComputer and factory methods to facilitate shell escapes. Add state to the cmLinkLineComputer to record whether outputting for response files or for watcom, to satisfy the cmOutputConverter API. These are constant for the lifetime of the cmLinkLineComputer, even when its functionality is extended in the future. This also keeps the signatures of cmLinkLineComputer relatively simple. Pass the cmComputeLinkInformation as a method parameter so that cmLinkLineComputer is free from target-specific state. An instance should be usable for all targets in a directory.
* | Makefiles: Port CreateLinkLibs to cmLinkLineComputerStephen Kelly2016-10-101-2/+7
| |
* | cmLinkLineComputer: Extract from cmLocalGeneratorStephen Kelly2016-10-101-2/+13
|/ | | | | | | | | | | CMake has several classes which have too many responsibilities. cmLocalGenerator is one of them. Start to extract the link line computation. Create generator-specific implementations of the interface to account for generator-specific behavior. Unfortunately MSVC60 has different behavior to everything else and CMake still generates makefiles for it. Isolate it with MSVC60-specific names.
* Makefiles: Introduce local RelativePath methodStephen Kelly2016-10-061-13/+13
| | | | | | | This makes it easier to remove directory-specific state from cmOutputConverter where it doesn't belong. Of course, this just relocates the problem to the makefiles generator for now, but that's better than affecting the core.
* 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.
* Convert: Inline uses of START_OUTPUTStephen Kelly2016-09-191-14/+28
|
* Convert: Avoid START_OUTPUT enum when converting to relative pathsStephen Kelly2016-09-191-8/+9
|
* Convert: Replace UNCHANGED conversions with new API callStephen Kelly2016-08-271-21/+15
|
* Convert: Replace uses of Convert(NONE)Stephen Kelly2016-08-271-7/+6
| | | | These are equivalent to ConvertToOutputFormat.
* Makefiles: Change AppendCustomCommand API to stringsStephen Kelly2016-08-271-4/+4
| | | | | Avoid the RelativeRoot enum. Supply the HOME_OUTPUT string at each callsite to make the parameter non-defaulted.
* Makefiles: Port CreateCDCommand to string-based APIStephen Kelly2016-08-271-3/+3
|
* fix a batch of include-what-you-use violationsDaniel Pfeifer2016-08-231-2/+9
|
* Makefile: Factor out response file checks into common helperBrad King2016-07-201-21/+4
| | | | | | Factor CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_{OBJECTS,LIBRARIES} lookup out into a common helper. Use a separate helper for each because more specific logic may be added to each later.
* Makefile: Factor out WINDOWS_EXPORT_ALL_SYMBOLS helperYury Zhuravlev2016-07-111-42/+1
| | | | | | Factor the implementation out of cmMakefileLibraryTargetGenerator into a helper method in cmMakefileTargetGenerator so it can be re-used elsewhere later.
* use CM_NULLPTRDaniel Pfeifer2016-06-281-4/+4
|
* Merge topic 'link_what_you_use'Brad King2016-06-171-0/+13
|\ | | | | | | | | | | 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-0/+13
| | | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | Apply fixits of clang-tidy's readability-braces-around-statements checker.
* | Run ranlib on archives only if the tool is availableBrad King2016-06-081-1/+4
|/ | | | | | | | | | | | | 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>
* Simplify boolean expressionsDaniel Pfeifer2016-06-021-2/+1
| | | | | | Use clang-tidy's readability-simplify-boolean-expr checker. After applying the fix-its, revise all changes *very* carefully. Be aware of false positives and invalid changes.
* Remove redundant c_str() calls.Daniel Pfeifer2016-05-261-4/+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-41/+43
| | | | | | | | | 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
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-416/+339
| | | | | | | | | | | | | 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-9/+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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* cmCommonTargetGenerator: Adopt AppendOSXVerFlag methodBruce Stephens2016-03-071-34/+0
| | | | | | | Move this method from cmMakefileLibraryTargetGenerator so it can be re-used for the Ninja generator too. Signed-off-by: Bruce Stephens <bruce.r.stephens@gmail.com>
* cmGeneratorTarget: Add API for target-relative commands.Stephen Kelly2015-10-261-4/+4
|
* Makefiles: Port to cmGeneratorTarget.Stephen Kelly2015-10-241-8/+11
|
* cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget.Stephen Kelly2015-10-191-2/+2
|
* cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.Stephen Kelly2015-10-191-3/+4
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmLocalGenerator: Port some API to cmGeneratorTarget.Stephen Kelly2015-10-171-6/+6
|