summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Precompile Headers: Add REUSE_FROM signatureCristian Adam2019-09-171-5/+108
| | | | | | | Add the ability to share precompiled headers artifacts between targets. Fixes: #19659
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-3/+3
|
* Merge topic 'modernize-use-auto'Brad King2019-09-121-10/+5
|\ | | | | | | | | | | | | d25a5a7ec9 clang-tidy: modernize-use-auto Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3783
| * clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-10/+5
| | | | | | | | | | | | 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.
* | Merge topic 'fileapiAddMoreBacktraces'Brad King2019-09-111-64/+196
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 30006e199b fileapi: add backtraces for compile/link options 291c83f063 cmLocalGenerator: Add GetTargetCompileFlags overload with backtraces 8e973b8e8d cmLocalGenerator: Add GetTargetFlags overload with backtraces 4d5bbb7704 cmLocalGenerator: Add GetStaticLibraryFlags overload with backtraces 1f6a436bf4 cmLocalGenerator: Add AddCompileOptions overload with backtraces 5355a60fd0 cmLocalGenerator: Add AppendCompileOptions overload with backtraces a20d2c85d0 cmLocalGenerator: Add AppendFlags overload with backtraces b13207910e cmLocalGenerator: Clarify AddCompileOptions filter logic ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3775
| * | cmLocalGenerator: Add GetTargetCompileFlags overload with backtracesJustin Goshi2019-09-101-2/+14
| | |
| * | cmLocalGenerator: Add GetTargetFlags overload with backtracesJustin Goshi2019-09-101-9/+30
| | |
| * | cmLocalGenerator: Add GetStaticLibraryFlags overload with backtracesJustin Goshi2019-09-101-4/+23
| | |
| * | cmLocalGenerator: Add AddCompileOptions overload with backtracesJustin Goshi2019-09-101-8/+35
| | |
| * | cmLocalGenerator: Add AppendCompileOptions overload with backtracesJustin Goshi2019-09-101-0/+24
| | |
| * | cmLocalGenerator: Add AppendFlags overload with backtracesJustin Goshi2019-09-091-0/+8
| | |
| * | cmLocalGenerator: Clarify AddCompileOptions filter logicJustin Goshi2019-09-091-5/+8
| | |
| * | cmLocalGenerator: Use local variables to collect flagsJustin Goshi2019-09-091-41/+59
| | |
| * | cmLocalGenerator: Improve local variable namesJustin Goshi2019-09-091-12/+12
| | |
* | | Merge topic 'MoveIfDifferent'Brad King2019-09-101-2/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | 5b96fd5b81 use cmSystemTools::MoveFileIfDifferent() 5eaf1e1be2 cmSystemTools: introduce MoveFileIfDifferent() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3794
| * | use cmSystemTools::MoveFileIfDifferent()Rolf Eike Beer2019-09-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is better than doing CopyFileIfDifferent() followed by RemoveFile() in two ways: - it is more efficient, as it avoids disk I/O for the data, even if the files here are usually small - it is atomic, so an abort during the copy will not leave a destination file with partial data behind
* | | Merge topic 'local-var'Brad King2019-09-101-4/+3
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | 4d71bea02c cmLocalGenerator::AddConfigVariableFlags: optimize string construction Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3793
| * | cmLocalGenerator::AddConfigVariableFlags: optimize string constructionRolf Eike Beer2019-09-091-4/+3
| |/
* | Merge topic 'cuda_resolve_device_symbols_on_static_lib_collect_deps_properly'Brad King2019-09-091-0/+7
|\ \ | |/ |/| | | | | | | | | 2d7bb13da7 CUDA: static lib device linking computes required static libs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3748
| * CUDA: static lib device linking computes required static libsRobert Maynard2019-09-051-0/+7
| | | | | | | | | | | | Previously the CMake didn't compute the required set of libraries needed to properly device link a static library when CUDA_RESOLVE_DEVICE_SYMBOLS was enabled.
* | cmLocalGenerator: Remove AppendFlags 'const char*' overloadBrad King2019-09-051-13/+5
| | | | | | | | | | Update call sites to ensure the `std::string` argument can be constructed safely.
* | Merge topic 'unity-build'Brad King2019-09-051-0/+96
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | 7786a05c70 Unity build: Add XCode support 1353802af3 Unity build: Add unit tests 8dfeb5d278 Unity build: Add support for Visual Studio generator 7114c141e2 Unity build: Add support for Ninja and Makefile generators Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com> Acked-by: Evgeniy Dushistov <dushistov@mail.ru> Acked-by: Viktor Kirilov <vik.kirilov@gmail.com> Merge-request: !3611
| * Unity build: Add XCode supportCristian Adam2019-08-301-1/+5
| |
| * Unity build: Add support for Visual Studio generatorCristian Adam2019-08-291-1/+8
| | | | | | | | | | | | | | | | | | It works as expected in Visual Studio. Visual Studio 2017 will (partially) benefit from the build in support for unity builds. The custom unity sources are used, because the build in support doesn't allow batching of certain number of files. It can do only batching by directory.
| * Unity build: Add support for Ninja and Makefile generatorsCristian Adam2019-08-291-0/+85
| |
* | clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-031-1/+1
| |
* | Merge topic 'add-non-empty-configurations-getter'Brad King2019-09-031-5/+2
|\ \ | | | | | | | | | | | | | | | | | | 10507c6dc0 cmMakefile: Add configurations getter with empty configuration default Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3759
| * | cmMakefile: Add configurations getter with empty configuration defaultDaniel Eiband2019-08-301-5/+2
| |/
* | cmSourceFile: Rename mutating GetFullPath() overloadDaniel Eiband2019-08-291-2/+2
|/ | | | Rename mutating GetFullPath() overload to ResolveFullPath().
* Merge topic 'precompile-headers'Brad King2019-08-291-0/+83
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Precompile headers: Add methods to generate PCH sourcesCristian Adam2019-08-281-0/+83
| | | | | | | | Co-Author: Daniel Pfeifer <daniel@pfeifer-mail.de>
* | Merge topic 'swift-version'Brad King2019-08-271-0/+11
|\ \ | |/ |/| | | | | | | | | 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/+11
| | | | | | | | | | | | 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.
* | Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-24/+12
|/ | | | | | | | | | | | 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-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* Merge topic 'isolate-declarations'Brad King2019-08-221-2/+2
|\ | | | | | | | | | | | | d331021255 clang-tidy: isolate declarations for readability Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3704
| * clang-tidy: isolate declarations for readabilityRegina Pfeifer2019-08-201-2/+2
| |
* | Merge topic 'cm-contains'Brad King2019-08-211-9/+5
|\ \ | |/ |/| | | | | | | | | | | | | 2dfc52675c cmAlgorithms: Add cmContains Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Sebastian Holtermann <sebholt@web.de> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !3700
| * cmAlgorithms: Add cmContainsRegina Pfeifer2019-08-191-9/+5
| | | | | | | | Also, use the new function where applicable.
* | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-7/+6
|/ | | | | | | | | 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-14/+14
|
* Merge topic 'strcat-localgenerator'Kyle Edwards2019-08-131-92/+48
|\ | | | | | | | | | | | | | | 62659100aa cmLocalGenerator: Use cmStrCat Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Sebastian Holtermann <sebholt@web.de> Merge-request: !3671
| * cmLocalGenerator: Use cmStrCatRegina Pfeifer2019-08-091-92/+48
| | | | | | | | Grep for '[A-Z]_";' to find places that could benefit from cmStrCat.
* | Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAPKitware Robot2019-08-091-1/+1
|/
* clang-tidy: Enable performance-inefficient-string-concatenationSebastian Holtermann2019-08-051-1/+1
| | | | | | | Enables the clang-tidy test performance-inefficient-string-concatenation and replaces all inefficient string concatenations with `cmStrCat`. Closes: #19555
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+1
| | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* cmMakefile: Let AddDefinition accept a value as cm::string_viewSebastian Holtermann2019-07-241-2/+2
| | | | | | | | | | | | | | | | This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value argument instead of a `const char *`. Benefits are: - `std::string` can be passed to `cmMakefile::AddDefinition` directly without the `c_str()` plus string length recomputation fallback. - Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at compile time. In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid `std::string::c_str` calls and the `std::string` is passed directly. Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
* Swift: fix static library handlingSaleem Abdulrasool2019-07-191-5/+7
| | | | | | Handle static libraries similar to shared libraries. Do not pass along the shared library flags raw as that will pass flags for the linker to the driver which is incorrect.
* AIX: Explicitly compute executable exports for both XL and GNUBrad King2019-07-151-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-1/+3
| | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.