summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-27/+18
| | | | | | Set the MinTypeNameLength option to an impossibly high value in order to limit the diagnostics to iterators. Leave new expressions and cast expressions for later.
* Unity build: Add support for Ninja and Makefile generatorsCristian Adam2019-08-291-0/+2
|
* Merge topic 'precompile-headers'Brad King2019-08-291-0/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8da78d4efe Precompile headers: Update documentation 5772930164 Precompile headers: Add unit tests 519606704e Precompile headers: Add support for Visual Studio generators 28be170fbc Precompile headers: Add support for Xcode generator b8626261e9 Precompile headers: Add methods to generate PCH sources 375d01c680 PCH: add example/test 9b6797e71d PCH: add target_precompile_headers command 0467a2f91b PCH: add PRECOMPILE_HEADERS to special properties Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Acked-by: Ivan171 <heavenandhell171@gmail.com> Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com> Acked-by: Steve Mokris <smokris@softpixel.com> Acked-by: Evgeniy Dushistov <dushistov@mail.ru> Acked-by: Danila Malyutin <flashmozzg@gmail.com> Acked-by: Viktor Kirilov <vik.kirilov@gmail.com> Acked-by: Lucas Zhao <zhaopf6@163.com> Merge-request: !3553
| * PCH: add PRECOMPILE_HEADERS to special propertiesDaniel Pfeifer2019-08-261-0/+46
| |
* | Merge topic 'swift-version'Brad King2019-08-271-0/+1
|\ \ | |/ |/| | | | | | | | | 369c48ee43 Swift: honour `-swift-version` in Ninja generator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3685
| * Swift: honour `-swift-version` in Ninja generatorSaleem Abdulrasool2019-08-261-0/+1
| | | | | | | | | | | | Swift has supported `CMAKE_Swift_LANGUAGE_VERSION` and `Swift_LANGUAGE_VERSION` but didn't apply that to Ninja generated targets. Consider the property when calculating the flags.
* | Merge topic 'source_sweep_ostringstream_single'Brad King2019-08-261-12/+9
|\ \ | | | | | | | | | | | | | | | | | | 3b2b02825d Source sweep: Replace std::ostringstream when used with a single append Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3726
| * | Source sweep: Replace std::ostringstream when used with a single appendSebastian Holtermann2019-08-231-12/+9
| |/ | | | | | | | | | | | | This replaces `std::ostringstream`, when it is written to only once. If the single written argument was numeric, `std::to_string` is used instead. Otherwise, the single written argument is used directly instead of the `std::ostringstream::str()` invocation.
* | Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-6/+3
|/ | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-34/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* 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
|