summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'lg-directory'Brad King2018-08-281-1/+1
|\ | | | | | | | | | | | | 50fbfee3a0 cmLocalGenerator: return directories as const std::string& Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2309
| * cmLocalGenerator: return directories as const std::string&Vitaly Stakhovsky2018-08-271-1/+1
| |
* | static library: add property STATIC_LIBRARY_OPTIONSMarc Chevrier2018-08-151-1/+1
|/ | | | issue: #18251
* LINK_DEPENDS: add support for property INTERFACE_LINK_DEPENDSMarc Chevrier2018-06-271-11/+11
| | | | Fixes: #17997
* LINK_OPTIONS: Add new family of propertiesMarc Chevrier2018-06-061-4/+4
| | | | | | | | | | | | | | This family enable to manage link flags Three new properties: * directory property: LINK_OPTIONS * target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS Two new commands * add_link_options(): to populate directory property * target_link_options(): to populate target properties Fixes: #16543
* Makefile generator: link flags management refactoringMarc Chevrier2018-06-061-34/+8
|
* Makefile: Fix command line limits for static libsViktor Mukha2018-05-161-4/+9
| | | | | | | | | | | | | | I have been hitting the Windows command-line limit when cross-compiling static library (POCO) and having more than 8000 characters in the call to "ar". Calculating exact limits here are tricky, since this particular limit will only take into account object file strings, which is correct for response files, but not for the archive rules (link.txt files), since they also contain the call to "ar" and its arguments. Also, there can be other additional arguments if "ar" tool is wrapped into something else, so it is a good idea to leave more space than trying to exactly fit the limit. Since response files use half of the limit as a heuristic, we reproduce it here for consistency.
* cmGeneratorTarget: Make import library checks config-awareMichael Stürmer2018-04-051-2/+2
|
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-5/+5
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* Reduce allocation of temporary values on heap.Pavel Solodovnikov2018-01-261-5/+5
| | | | | - Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
* Makefiles: Drop 'requires' step and its supporting infrastructureYurii Batrak2017-12-141-3/+0
| | | | | | | | The 'requires' step was used to provide implicit dependencies between the generated Fortran module files and a Fortran target that needs these module files to ensure the correct compilation order. After recent refactoring to resolve all dependencies explicitly through `.mod.stamp` make targets, the separate 'requires' step is not needed anymore.
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-7/+7
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Merge topic 'refactor-iwyu-code'Brad King2017-09-151-1/+1
|\ | | | | | | | | | | | | 3bbe95f5 Clean up iwyu code to not be one big if statement. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1247
| * Clean up iwyu code to not be one big if statement.Bill Hoffman2017-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | This commit changes the internal -E__run_iwyu to be -E__run_co_compile. This is used for co-compile commands. These are tools that want to mirror the compiler. For each compiler invocation the tool will be invoked first. This started as a way to implement include what you use (iwyu), but has expanded to include cpplint, cppcheck and others. Likely there will be more in the future as well. This commit implements each one in its own function and provides a way to add additional ones in the future with less work.
* | Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-22/+14
|/ | | | | | 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-3/+3
|
* IPO: Consider support for each language separatelyBrad King2017-06-141-3/+3
| | | | | | | | | We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and Fortran languages. Do not try to enable support for other languages. Furthermore, each language builds with a different compiler, so check for support by CMake and the compiler for each language independently. Fixes: #16944
* cmLocalGenerator: Add a hook for compiler flags used at link timeBrad King2017-05-011-4/+4
| | | | | | | | | | | | When using a compiler to drive linking we add compiler flags from `CMAKE_<LANG>_FLAGS` in case they affect the way the compiler invokes the linker, but we don't add flags from other places that are meant only for compiling sources. Rather than calling the `AddLanguageFlags` method (which is used to add flags for compiling sources) directly, add an intermediate method that is used when adding the flags for linking. This will give us a way to add language-specific compiler flags needed when driving the linker in the same place on the command line as other compiler flags go.
* Clang IPO (LTO) supportRuslan Baratov2017-04-281-0/+2
|
* Inline and remove AddFeatureFlags methodBrad King2017-04-271-4/+6
| | | | | The method implementation is now only one call of another method, so inline it at call sites and remove it.
* CUDA: Static libraries can now explicitly resolve device symbolsRobert Maynard2017-04-261-0/+28
| | | | | | | If a static library has the property CUDA_RESOLVE_DEVICE_SYMBOLS enabled it will now perform the device link step. The normal behavior is to delay calling device link until the static library is consumed by a shared library or an executable.
* CUDA: Makefile uses relative path for device linking status messagesRobert Maynard2017-04-261-2/+6
|
* Replace boolean `implib` parameters with enumGregor Jasny2017-04-201-1/+2
| | | | | Named enumeration values are much clearer at call sites and add more type safety.
* Implement interprocedural optimization for GNU compilersRuslan Baratov2017-03-301-7/+14
| | | | | Honor the `INTERPROCEDURAL_OPTIMIZATION` target property for GNU compilers by activating their link-time-optimization (LTO) flags.
* Refactoring: s,GetFeatureAsBool,IsIPOEnabled,Ruslan Baratov2017-03-301-1/+1
| | | | | Method 'GetFeatureAsBool' is used only with 'INTERPROCEDURAL_OPTIMIZATION' feature. Substituting 'GetFeatureAsBool' with 'IsIPOEnabled'.
* Refactor WINDOWS_EXPORT_ALL_SYMBOLS implementationBrad King2017-03-091-4/+1
| | | | | | | Use `cmGeneratorTarget::ModuleDefinitionInfo` to combine the implementation of `WINDOWS_EXPORT_ALL_SYMBOLS` with that of using a `.def` file as a source. Only one of these could be used within a single target before anyway.
* fix some include-what-you-use diagnosticsDaniel Pfeifer2017-02-171-2/+1
|
* 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.