summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-2/+2
| | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-5/+5
|
* Merge topic 'support_CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS'Kyle Edwards2019-08-131-0/+1
|\ | | | | | | | | | | | | 8f1d22c2d9 CUDA: Support CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS global variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3636
| * CUDA: Support CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS global variableRobert Maynard2019-08-061-0/+1
| |
* | Merge topic 'fileapi-install-generators'Brad King2019-08-051-0/+12
|\ \ | |/ |/| | | | | | | | | d70a0f8681 fileapi: Fix codemodel target install destination for cross-dir rules Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3639
| * fileapi: Fix codemodel target install destination for cross-dir rulesBrad King2019-07-311-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Since commit e89ad0f94e (install: Allow installing targets created in another directory, 2018-06-18, v3.13.0-rc1~407^2) we support calling `install(TARGETS)` for targets created in another directory. However, install generators are associated with the directory in which the call to `install()` appears. This may not be the same directory in which the target is defined. Record in each target the list of install generators it has. Fixes: #19546
* | Property: Add INSTALL_REMOVE_ENVIROMENT_RPATH propertyJiang Yue2019-07-251-0/+1
| |
* | AIX: Create import library for executables with exportsBrad King2019-07-161-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AIX, plugins meant to be loaded into executables via `dlopen` must be linked with access to a list of symbols exported from the executable in order to use them (when not using runtime linking). The AIX linker supports specifying this list as an "import file" passed on the command line either via the `-bI:...` option or (with a leading `#! .` line) as a normal input file like any other library file. The linker import file plays the same role on AIX as import libraries do on Windows. Teach CMake to enable its import library abstraction on AIX for executables with the `ENABLE_EXPORTS` target property set. Teach our internal `ExportImportList` script to optionally generate a leading `#! .` line at the top of the generated export/import list. Update our rule for linking an executable with exports to generate a public-facing "import library" implemented as an AIX linker import file. With this approach, our existing infrastructure for handling import libraries on Windows will now work for AIX linker import files too: * Plugins that link to their executable's symbols will be automatically linked using the import file on the command line. * The executable's import file will be (optionally) installed and exported for use in linking externally-built plugins. This will allow executables and their plugins to build even if we later turn off runtime linking. Issue: #19163
* | AIX: Explicitly compute executable exports for both XL and GNUBrad King2019-07-151-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AIX, symbols in executables must be exported in order to be visible to modules (plugins) they load via `dlopen`. Prior to policy `CMP0065`, CMake linked all executables with flags to export symbols, but the NEW behavior for that policy is to do so only for executables that have the `ENABLE_EXPORTS` target property set. In both cases, CMake has always used the AIX linker option `-bexpall` option to export symbols from executables. This has worked fairly well with the XL compiler, but with the GNU compiler it works only for C ABI symbols. The reason is that `-bexpall` does not export symbols starting in `_` but the GNU C++ ABI mangles all symbols with a leading `_`. Therefore we have only supported C ABI plugins with the GNU compiler on AIX. Some projects have tried to work around this by replacing `-bexpall` with `-bexpfull`, but the latter often exports symbols that we do not want exported. Avoid using `-bexpall` for executables by instead using by our own internal `ExportImportList` script to compute symbol export lists from the object files to be linked into an executable. Pass the explicitly computed export list to the AIX linker's `-bE:...` option. We already do this for shared object exports. Issue: #19163
* | Merge topic 'cleanup-gen-lookups'Brad King2019-07-151-4/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 7ff9ab3b10 Makefile: De-duplicate executable link rule lookup 79f5ef19fe De-duplicate checks for whether a platform uses Windows DLLs 22d3eb5d5e Refactor checks for whether a target has an import library Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3550
| * | De-duplicate checks for whether a platform uses Windows DLLsBrad King2019-07-121-4/+9
| | |
* | | Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-141-0/+2
|/ /
* | cmTarget: Initialize static std::unordered_set on constructionSebastian Holtermann2019-06-041-18/+17
| |
* | cmTarget: Property initialization cleanupSebastian Holtermann2019-06-041-121/+128
|/
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-22/+16
|
* Add variable CMAKE_FRAMEWORKRuslan Baratov2019-05-211-0/+1
|
* Ninja: add placeholders to support Swift buildSaleem Abdulrasool2019-05-161-0/+1
| | | | Add the placeholders needed to support compiling Swift code.
* MSVC: Add support for /JMC (Just My Code)Luca Cappa2019-05-141-0/+1
|
* MSVC: Add abstraction for runtime library selectionBrad King2019-04-171-0/+1
| | | | | | | | | | | | | | | | Replace our hard-coded defaults for `/MD` and `/MDd` with a first-class abstraction to select the runtime library from an enumeration of logical names. We've long hesitated to do this because the idea of "runtime library selection" touches on related concepts on several platforms. Avoid that scope creep by simply defining an abstraction that applies only when targeting the MSVC ABI on Windows. Removing the old default flags requires a policy because existing projects may rely on string processing to edit them and choose a runtime library under the old behavior. Add policy CMP0091 to provide compatibility. Fixes: #19108
* Fix invalid ///! doxygen comment line startsSebastian Holtermann2019-03-311-1/+1
| | | | | In various places `///!` was used to start a comment line. This is not valid Doygen syntax. This patch replaces `///!` comment starts with `//!`.
* cmTarget: Use std::unique_ptr instead of custom smart pointerSebastian Holtermann2019-03-231-34/+6
| | | | | | | | To manage the lifetime of `cmTargetInternals`, the private implementation of `cmTarget`, use `std::unique_ptr<cmTargetInternals>` instead of `cmTargetInternalPointer`, which is removed. `cmTarget` is made non-copyable but movable.
* cmTarget: Make private `SetPropertyDefault` an in code lambda `InitProperty`Sebastian Holtermann2019-03-231-130/+124
|
* cmTarget: Inline private HasImportLibrary methodSebastian Holtermann2019-03-231-8/+3
|
* cmTarget: Move member method `CheckImportedLibName` to implSebastian Holtermann2019-03-231-8/+11
|
* cmTarget: Move member method `ProcessSourceItemCMP0049()` to implSebastian Holtermann2019-03-231-7/+10
|
* cmTarget: Move member booleans to implSebastian Holtermann2019-03-231-16/+53
|
* cmTarget: Move member `*Commands` to implSebastian Holtermann2019-03-231-0/+34
|
* cmTarget: Move member `RuntimeInstallPath` to implSebastian Holtermann2019-03-231-0/+11
|
* cmTarget: Move member `InstallPath` to implSebastian Holtermann2019-03-231-0/+11
|
* cmTarget: Move member `Name` to implSebastian Holtermann2019-03-231-11/+17
|
* cmTarget: Move member `TLLCommands` to implSebastian Holtermann2019-03-231-5/+7
|
* cmTarget: Move member `Backtrace` to implSebastian Holtermann2019-03-231-2/+3
|
* cmTarget: Move member `PolicyMap` to implSebastian Holtermann2019-03-231-2/+14
|
* cmTarget: Move member `OriginalLinkLibraries` to implSebastian Holtermann2019-03-231-1/+8
|
* cmTarget: Move member `Utilities` to implSebastian Holtermann2019-03-231-5/+11
|
* cmTarget: Move member `SystemIncludeDirectories` to implSebastian Holtermann2019-03-231-2/+8
|
* cmTarget: Move member `Properties` to impl classSebastian Holtermann2019-03-231-3/+10
|
* cmTarget: Move member `Makefile` to implSebastian Holtermann2019-03-231-77/+80
|
* cmTarget: Move member `TargetType` to implSebastian Holtermann2019-03-231-13/+19
|
* cmTarget: Rename member `Internal` to `impl`Sebastian Holtermann2019-03-231-129/+123
|
* Merge topic 'cmTarget_micro_fixes'Brad King2019-03-221-57/+34
|\ | | | | | | | | | | | | | | 965da8d787 cmTarget: Acquire data only when needed 03d17a35b5 cmTarget: Use helper function to append to lists Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3135
| * cmTarget: Acquire data only when neededSebastian Holtermann2019-03-211-4/+3
| |
| * cmTarget: Use helper function to append to listsSebastian Holtermann2019-03-211-53/+31
| |
* | Xcode: Create Xcode schemes per targetHarry Mallon2019-03-211-0/+1
|/
* cmRange: Move to dedicated header fileRegina Pfeifer2019-02-211-0/+1
|
* Modernize: C-arrays and loops over themArtur Ryt2019-02-151-5/+6
| | | | | It replaces C arrays with deduced std::initializer_lists or std::array what makes enables for-loop over them.
* Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-4/+2
| | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.Bruno Manganelli2019-01-271-3/+3
|
* Merge topic 'autogen_mocs_compilation_first'Brad King2019-01-211-3/+9
|\ | | | | | | | | | | | | | | | | 1ed4d48dcf Autogen: Prepend instead of append `mocs_compilation.cpp` to the sources list a42b700cc2 cmTarget,cmGeneratorTarget: Add optional `before` parameter to AddSource Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Peter Wu <peter@lekensteyn.nl> Merge-request: !2815
| * cmTarget,cmGeneratorTarget: Add optional `before` parameter to AddSourceSebastian Holtermann2019-01-181-3/+9
| | | | | | | | | | | | The new optional `before` parameter in `cmTarget::AddSource` and `cmGeneratorTarget::AddSource` allows to prepend a source file to the sources list instead of appending it.