summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'enable_ptx_compilation'Brad King2017-04-211-0/+12
|\ | | | | | | | | | | | | 23691d78 CUDA: Allow sources to be compiled to .ptx files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !725
| * CUDA: Allow sources to be compiled to .ptx filesRobert Maynard2017-04-201-0/+12
| | | | | | | | | | When the target property `CUDA_PTX_COMPILATION` is enabled CUDA OBJECT libraries will generate ptx files instead of object files.
* | Replace boolean `implib` parameters with enumGregor Jasny2017-04-201-95/+131
|/ | | | | Named enumeration values are much clearer at call sites and add more type safety.
* Merge topic 'objlib-extend'Brad King2017-04-191-0/+40
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | eec93bce Allow OBJECT libraries to be installed, exported, and imported 93c89bc7 Genex: Allow TARGET_OBJECTS to be used everywhere ac0cf7ff Genex: Reject TARGET_OBJECTS on non-object libraries earlier 8577978c Tests: ExportImport C code should use explicit (void) in prototypes 26cfd039 cmInstallTargetGenerator: Re-order GenerateScriptForConfig logic 25f3f22a cmGlobalGenerator: Add method to check if object file location is known d596c550 cmGeneratorTarget: Add method to get the object file directory 930042f2 cmGeneratorTarget: Factor out a GetTargetObjectNames method ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !712
| * cmGeneratorTarget: Add method to get the object file directoryBrad King2017-04-181-0/+13
| | | | | | | | | | Add a `GetObjectDirectory` method to get the target's object file directory for a specific configuration.
| * cmGeneratorTarget: Factor out a GetTargetObjectNames methodBrad King2017-04-181-0/+27
| |
* | Merge topic 'fix-CMP0026-old'Brad King2017-04-181-0/+20
|\ \ | |/ |/| | | | | | | | | 5e616fcf CMP0026: Fix OLD behavior with file written during configure step Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !710
| * CMP0026: Fix OLD behavior with file written during configure stepBrad King2017-04-171-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit 60307c5056 (cmGeneratorTarget: Replace source classifier implementation, 2017-04-07) accidentally regressed support for CMP0026's OLD behavior in the case of a source file written by project code during the configure step after getting a LOCATION. We should not perform full source classification until the generate step because files written by the project's configure step may not exist yet. Add special logic to support this case. Add a test case for it. Reported-by: David Stoup <david.stoup@kitware.com>
* | cmGeneratorTarget: Drop obj libs from GetConfigCommonSourceFilesBrad King2017-04-131-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | Call sites such as those in the VS global generator that are used only to reject per-config sources will now allow per-config object library objects. The corresponding generators have already been taught to deal with per-config object library files. Remaining call sites do not need object library files anyway. This will later allow `$<TARGET_OBJECTS:...>` generator expressions to evaluate to values that vary by configuration (e.g. because each configuration has its own object files).
* | cmGeneratorTarget: Add method to collect all sources for all configsBrad King2017-04-131-0/+37
| | | | | | | | | | | | Multi-config generators like VS and Xcode need to loop over all the source files first and then handle per-config information within each one. Teach cmGeneratorTarget to provide such a view.
* | Merge topic 'xcode-remove-UseObjectLibraries'Brad King2017-04-131-35/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 229abfc8 cmGeneratorTarget: Drop unused UseObjectLibraries method 63fbf587 Xcode: Inline relevant parts of UseObjectLibraries 1afacebe Xcode: Do not add Object Libraries source group on Xcode >= 5 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !698
| * | cmGeneratorTarget: Drop unused UseObjectLibraries methodBrad King2017-04-121-35/+0
| | |
* | | Merge topic 'include-style'Brad King2017-04-131-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | 1d829c86 Use quotes for non-system includes 26ee9e42 CPack: drop CPack prefix for includes 5afac50f cmConfigure: Ensure separate include block in headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !691
| * | Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* | cmGeneratorTarget: Drop unused GetIDLSources methodBrad King2017-04-111-6/+0
|/
* cmGeneratorTarget: Replace source classifier implementationBrad King2017-04-071-259/+145
| | | | | Compute and memoize the list of sources with their kinds for each configuration just once.
* cmGeneratorTarget: Remove unnecessary conditionBrad King2017-04-071-2/+0
| | | | Remove a condition where the "then" and "else" cases do the same thing.
* Merge topic '16733-bundle-genex'Brad King2017-03-311-29/+35
|\ | | | | | | | | | | | | | | | | | | | | d1dac1ac Xcode: Execute RunCMake.Framework also for Xcode generator d02709d7 Genex: Add `TARGET_BUNDLE_[CONTENT_]_DIR` generator expressions 013ffe76 cmGeneratorTarget: Call GetFrameworkDirectory in GetFullNameInternal 32e9d0ca cmGeneratorTarget: Use enum to describe bundle directory query level Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Craig Scott <craig.scott@crascit.com> Merge-request: !635
| * Genex: Add `TARGET_BUNDLE_[CONTENT_]_DIR` generator expressionsGregor Jasny2017-03-301-2/+8
| | | | | | | | Closes #16733
| * cmGeneratorTarget: Call GetFrameworkDirectory in GetFullNameInternalGregor Jasny2017-03-301-7/+1
| |
| * cmGeneratorTarget: Use enum to describe bundle directory query levelGregor Jasny2017-03-301-20/+26
| |
* | Merge topic 'ipo-policy-CMP0069'Brad King2017-03-311-10/+75
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | dfa8263f Implement interprocedural optimization for GNU compilers 1588a577 Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION a7575700 Refactoring: s,GetFeatureAsBool,IsIPOEnabled, e05835c3 CheckIPOSupported: Visual Studio and Xcode generators do not support IPO Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Nils Gladitz <nilsgladitz@gmail.com> Merge-request: !568
| * Implement interprocedural optimization for GNU compilersRuslan Baratov2017-03-301-7/+16
| | | | | | | | | | Honor the `INTERPROCEDURAL_OPTIMIZATION` target property for GNU compilers by activating their link-time-optimization (LTO) flags.
| * Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATIONRuslan Baratov2017-03-301-1/+57
| | | | | | | | | | | | | | | | | | Previously the `INTERPROCEDURAL_OPTIMIZATION` target property was honored only for the Intel compiler on Linux and otherwise ignored. In order to add support for more compilers incrementally without changing behavior in the future, add a new policy whose NEW behavior enforces the `INTERPROCEDURAL_OPTIMIZATION` property. Add flags for supported compilers and otherwise produce an error.
| * Refactoring: s,GetFeatureAsBool,IsIPOEnabled,Ruslan Baratov2017-03-301-3/+3
| | | | | | | | | | Method 'GetFeatureAsBool' is used only with 'INTERPROCEDURAL_OPTIMIZATION' feature. Substituting 'GetFeatureAsBool' with 'IsIPOEnabled'.
* | Apple: Fix Resources location for all generatorsGregor Jasny2017-03-231-1/+9
| | | | | | | | Issue: #16680
* | Xcode: Properly handle Bundle Resources with more than one hierarchy levelGregor Jasny2017-03-221-0/+2
|/ | | | Issue: #16680
* Support WINDOWS_EXPORT_ALL_SYMBOLS with `.def` filesBrad King2017-03-211-5/+6
| | | | | | | | | | | The `WINDOWS_EXPORT_ALL_SYMBOLS` target property exports all symbols found in object files explicitly given to the linker. However, the linker may also find additional symbols in dependencies and copy them into the linked binary (e.g. from `msvcrt.lib`). Provide a way to export an explicit list of such symbols by adding a `.def` file as a source file. Fixes: #16473
* Refactor WINDOWS_EXPORT_ALL_SYMBOLS implementationBrad King2017-03-091-1/+6
| | | | | | | 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.
* Refactor module definition file selectionBrad King2017-03-091-7/+31
| | | | | | Create a `ModuleDefinitionInfo` structure for each configuration of a target to hold corresponding information about the selected module definition file (`.def` source).
* Refactor module definition source enumerationBrad King2017-03-091-5/+10
| | | | Add a `cmGeneratorTarget::GetModuleDefinitionSources` method.
* VS: Cache the list of xaml and resx headersDmitry Kochkin2017-02-271-7/+19
| | | | Speed up VS project generation with many such headers.
* Merge topic 'object-library-compile-pdb'Brad King2017-02-271-1/+1
|\ | | | | | | | | feff52d4 Fix COMPILE_PDB_NAME when used on an OBJECT library
| * Fix COMPILE_PDB_NAME when used on an OBJECT libraryBrad King2017-02-241-1/+1
| | | | | | | | | | | | | | | | When `COMPILE_PDB_NAME` is used without `COMPILE_PDB_OUTPUT_DIRECTORY` we cannot fall back on the link `PDB_OUTPUT_DIRECTORY` for an object library because it has no link step. Fixes: #16674
* | Add policy CMP0068 separate install_name and RPATH settings on macOSClinton Stimpson2017-02-141-0/+21
| | | | | | | | | | | | | | | | BUILD_WITH_INSTALL_RPATH, SKIP_BUILD_RPATH, CMAKE_SKIP_RPATH and CMAKE_SKIP_INSTALL_RPATH no longer any effect on the install name of a target on macOS. Fixes: #16589
* | Apple: Add BUILD_WITH_INSTALL_NAME_DIR target propertyClinton Stimpson2017-02-141-0/+6
| | | | | | | | | | This new property controls whether to apply INSTALL_NAME_DIR to the build tree. It also overrides BUILD_WITH_INSTALL_RPATH.
* | Apple: Refactor support for using INSTALL_NAME_DIR.Clinton Stimpson2017-02-141-20/+39
|/
* Apple: Add support for static frameworksGregor Jasny2017-01-311-1/+2
| | | | Closes: #16432
* Xcode: Control emission of EFFECTIVE_PLATFORM_NAMEGregor Jasny2017-01-201-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with multiple SDKs within one project Xcode requires the usage of ${EFFECTIVE_PLATFORM_NAME} to put temporary and build outout into separate directories. For example an iOS device and simulator build use two different SDKs (iphoneos and iphonesimulator). In the past cmake tries to detect embedded toolchains that could possibly use simulators and emitted EFFECTIVE_PLATFORM_NAME (EPN) at the proper locations. In #16253 Mark noticed that if he uses macosx and iphoneos in combination the necessary EPN is not emitted. This is because CMake by default assumes macosx SDK which does not trigger EPN emission. The fist naive approach - enabling EPN unconditionally revealed that then the EPN leaks into generator expressions like $<TARGET_FILE:xxx> which might be a regression and thus is unacceptable. The next approach was to add an CMake property to enable EPN emission unconditionally. This solved the reported problem. But the EPN leakage also happened for the embedded toolchains already without anyone noticing. So the control property was turned into a tri-state one: * No definition: EPN is activated for embedded toolchains like before * ON: EPN is always emitted * OFF: EPN is never emitted That approach gives the user the chance to disable EPN for embedded toolchains and restores generator expression functionality for those. Closes: #16253
* clang-tidy: apply modernize-use-bool-literals fixesDaniel Pfeifer2016-12-121-6/+7
|
* cmGeneratorTarget: Add AddIncludeDirectory method (experimental)Sebastian Holtermann2016-12-071-0/+15
|
* Merge topic 'imported-interface-libname'Brad King2016-11-091-0/+13
|\ | | | | | | | | | | | | | | 09cda9d5 Allow imported INTERFACE libraries to specify a link library name 1d1f1eeb cmTarget: Refactor GetMappedConfig to choose location property up front 479932fa cmTarget: Add comment clarifying interface library special case 925e4270 cmTarget: Clarify comments in GetMappedConfig
| * Allow imported INTERFACE libraries to specify a link library nameBrad King2016-11-091-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an `IMPORTED_LIBNAME[_<CONFIG>]` target property to specify a library name to be placed on the link line in place of an interface library since it has no library file of its own. Restrict use of the property to imported `INTERFACE` libraries. This will be particularly useful for find modules that need to provide imported libraries from system SDKs where the full path to the library file is not known. Now such find modules will be able to provide an imported interface library and set `IMPORTED_LIBNAME` to refer to the SDK library by name. Issue: #15267
* | Merge topic 'include-what-you-use'Brad King2016-11-081-10/+12
|\ \ | | | | | | | | | | | | 2e620f0b Fix several include-what-you-use findings
| * | Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-10/+12
| |/
* | cmGeneratorTarget: Correctly set FortranModuleDirectoryCreatedDaniel Pfeifer2016-11-051-0/+1
| |
* | cmGeneratorTarget: Don't assing a bool to a stringDaniel Pfeifer2016-11-051-1/+0
|/
* Introduce CM_UNORDERED_SETDaniel Pfeifer2016-10-241-27/+22
| | | | | Avoid duplicating switch among std::unordered_set, cmsys::hash_set, and std::set.
* Merge topic 'clang-tidy'Brad King2016-10-201-1/+1
|\ | | | | | | | | | | effa6c83 fix more issues reported by clang-tidy fb461cac silence selected clang-tidy violations
| * fix more issues reported by clang-tidyDaniel Pfeifer2016-10-201-1/+1
| |