Commit Graph

24212 Commits

Author SHA1 Message Date
Vitaly Stakhovsky
8401b6ac4e cmXMLWriter: Add RAII helpers to allow DOM-like syntax
Use RAII for cmXMLWriter::StartElement/EndElement to make nesting
automatic.
2018-03-09 07:28:49 -05:00
Kitware Robot
0e362b23e1 CMake Nightly Date Stamp 2018-03-04 00:01:07 -05:00
Kitware Robot
dbfdb90430 CMake Nightly Date Stamp 2018-03-03 00:01:12 -05:00
Kitware Robot
dc13ed1f84 CMake Nightly Date Stamp 2018-03-02 00:01:06 -05:00
Brad King
61f92e69c0 Merge topic 'object-library-export-as-interface'
ea0ce73a19 install,export: Maybe transform OBJECT libraries to INTERFACE libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1811
2018-03-01 07:54:20 -05:00
Kitware Robot
e02f4f0660 CMake Nightly Date Stamp 2018-03-01 00:01:06 -05:00
Brad King
ea0ce73a19 install,export: Maybe transform OBJECT libraries to INTERFACE libraries
Teach the `install` and `export` commands to support installing and
exporting `OBJECT` libraries without their object files.  Transform
them to `INTERFACE` libraries in such cases.

For `install(TARGETS)`, activate this when no destination for the object
files is specified.  For `export`, activate this only under Xcode with
multiple architectures when we have no well-defined object file
locations to give to clients.
2018-02-28 10:58:10 -05:00
Brad King
82de05088f Merge topic 'co-compile-with-launcher'
eaf9f69d41 Fix combined use of compiler launcher with lint tools

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1791
2018-02-28 08:17:33 -05:00
Brad King
514e845f4e Merge topic 'ideoptions-string'
8182ebca32 cmIDEOptions: use std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1804
2018-02-28 08:16:14 -05:00
Kitware Robot
cc87b1f0d7 CMake Nightly Date Stamp 2018-02-28 00:01:10 -05:00
Ilya A. Kriveshko
eaf9f69d41 Fix combined use of compiler launcher with lint tools
When using ccache with clang-tidy, ccache needs to wrap compiler
invocation, rather than cmake invocation.  But it needs to do it without
affecting the command line that iwyu-like tools are receiving.

With this fix, if __run_co_compile is used, compile launcher is passed
using the new --launcher option, but if __run_co_compile is not needed,
compiler launcher is prepended to the command line as before.

To better illustrate the change: with this fix if running clang-tidy
with CXX_COMPILER_LAUNCHER set to "/usr/bin/time;-p;ccache" (time -p
added strictly for illustration purposes), the command line changes
from:

    /usr/bin/time -p ccache cmake -E __run_co_compile \
        --tidy=clang-tidy ... -- g++ ...

to:

    cmake -E __run_co_compile \
        --launcher="/usr/bin/time;-p;ccache" \
        --tidy=clang-tidy ... -- g++ ...

This allows the compiler to be run via the launcher, but leaves tidy
(& friends) invocations unaffected.

Fixes: #16493
2018-02-27 13:07:04 -05:00
Kitware Robot
464ae1bcc0 CMake Nightly Date Stamp 2018-02-27 00:01:09 -05:00
Vitaly Stakhovsky
8182ebca32 cmIDEOptions: use std::string 2018-02-26 11:24:45 -05:00
Brad King
f7430b2538 Merge topic 'extend_suppress_regeneration'
b6ef4bc3 Document and extend the CMAKE_SUPPRESS_REGENERATION variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1792
2018-02-26 09:02:07 -05:00
Brad King
ba806600f7 Merge topic 'outputconverter_speedup'
8ab3660a cmOutputConverter: Inline some functions and avoid string re-allocations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !1788
2018-02-26 09:01:24 -05:00
Brad King
3bc18cd0fb Merge topic 'getsource_optimize'
2d1e5ada cmMakefile: Improve performance of GetSource for known files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1764
2018-02-26 09:00:51 -05:00
Brad King
1f7ad8ab5c Merge topic 'project-references-csharp-17678'
076a356c VS: Support C# project references

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1752
2018-02-26 08:57:25 -05:00
Brad King
8621a26c06 Merge topic 'vs-cpp-improvements'
b723fe3d VS: Convert loops to C++11, other C++ improvements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1786
2018-02-26 08:56:09 -05:00
Kitware Robot
25613b9fa4 CMake Nightly Date Stamp 2018-02-26 00:01:05 -05:00
Kitware Robot
b595381822 CMake Nightly Date Stamp 2018-02-25 00:01:07 -05:00
Kitware Robot
a4e7538a74 CMake Nightly Date Stamp 2018-02-24 00:01:37 -05:00
Frank Winklmeier
8ab3660a1e cmOutputConverter: Inline some functions and avoid string re-allocations
Use std::string (with correct initial size) in cmOutputConverter::Shell__GetArgument
instead of ostringstream. This avoids several re-allocations of the
string buffer. In addition, convert some of the private static members into
inline free functions to avoid function calls.
2018-02-23 17:23:10 +01:00
Shane Parris
b6ef4bc329 Document and extend the CMAKE_SUPPRESS_REGENERATION variable
Fixes: https://gitlab.kitware.com/cmake/cmake/issues/16815
2018-02-23 11:20:15 -05:00
Frank Winklmeier
2d1e5adaeb cmMakefile: Improve performance of GetSource for known files
Store "Known" files separately in KnownFileSearchIndex. This avoids
creating the rather expensive cmSourceFileLocation object for source
files that are already known. For large projects this results in a
factor 3-4 speedup of cmGlobalGenerator::Compute().
2018-02-23 17:06:28 +01:00
Robert Dailey
076a356cd1 VS: Support C# project references
When specifying a pure C# target in the `target_link_libraries()` call to
another C++ target, a `<ProjectReference>` was setup for it (we wanted this)
but also a corresponding `.lib` was added under `<AdditionalDependencies>`
(we didn't want this).

This change introduces a check that prevents `.lib` linker options from
being used when the corresponding target for that library is a C# target.

Fixes: #17678
2018-02-23 08:53:17 -06:00
Brad King
4732dbf32d Merge topic 'ninja-depfile-name'
84de8b80 Ninja: Use as dependency file <objectDir/SourceName>.d if needed.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1781
2018-02-23 08:24:14 -05:00
Brad King
f6fc689c26 Merge topic '14297-partial-xcode-zero-check'
481420ee Xcode: Generate ZERO_CHECK generator target only once

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1790
2018-02-23 08:22:51 -05:00
Brad King
c786164fe0 Merge topic 'std-thread-link'
94eee5e6 CMakeLib: Link to system thread libraries to support std::thread

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Chabrowski <dantezstudio@gmail.com>
Merge-request: !1789
2018-02-23 08:19:49 -05:00
Kitware Robot
1f082f2b60 CMake Nightly Date Stamp 2018-02-23 00:01:11 -05:00
Gregor Jasny
481420ee89 Xcode: Generate ZERO_CHECK generator target only once
In case CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY has been enabled
generate only the root-level ZERO_CHECK target so targets in
subdirectories pick up the root generator target of ZERO_CHECK.

For the case that CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY is not
enabled more investigation and a proper and final fix is still needed.

Issue: 14297
2018-02-22 21:15:48 +01:00
Brad King
94eee5e683 CMakeLib: Link to system thread libraries to support std::thread
Some environments require linking to thread libraries for `std::thread`.
Express this direct dependency of CMakeLib explicitly.  Previously this
was done indirectly through our bundled libuv, but that does not work
when using a system libuv.

Fixes: #17757
2018-02-22 12:59:20 -05:00
Brad King
5c0223886e Merge topic 'setidentifier_move'
46436581 cmGeneratorExpression: Use std::move to avoid vector copies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1779
2018-02-22 11:36:34 -05:00
Brad King
b0e2b256c8 Merge topic 'cmake-build-global-gen'
83f8e764 cmake: Fix global generator path style in --build mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1784
2018-02-22 11:34:50 -05:00
Kitware Robot
a08ede979b CMake Nightly Date Stamp 2018-02-22 00:01:07 -05:00
Vitaly Stakhovsky
b723fe3d7d VS: Convert loops to C++11, other C++ improvements 2018-02-21 21:18:59 -05:00
Frank Winklmeier
46436581c6 cmGeneratorExpression: Use std::move to avoid vector copies
Use move semantics in GeneratorExpressionContent::SetIdentifier and
::SetParameters to avoid vector copies.
2018-02-21 11:11:50 -05:00
Brad King
83f8e76467 cmake: Fix global generator path style in --build mode
Fix the `--build` code path so that `cmSystemTools::SetForceUnixPaths`
is called with the global generator's path style.  This makes forwarding
of `--target subdir/src.c.obj` match the slash style the generator
placed in the build system.

Fixes: #17742
2018-02-21 10:13:47 -05:00
Kitware Robot
4e6f94d49c CMake Nightly Date Stamp 2018-02-21 00:01:09 -05:00
Claus Klein
84de8b80ec Ninja: Use as dependency file <objectDir/SourceName>.d if needed. 2018-02-20 21:42:50 +01:00
Brad King
846a4dd118 Merge topic 'string-join'
689eeb67 string: Add JOIN subcommand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !1762
2018-02-20 11:47:51 -05:00
Brad King
8a99ccc5ed Merge topic 'ninja-cmake-deps'
ed000d7d Ninja: Don't add custom command outputs to phony rule for CMake inputs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1768
2018-02-20 11:46:21 -05:00
Kitware Robot
31419815aa CMake Nightly Date Stamp 2018-02-20 00:01:08 -05:00
Kitware Robot
a99ff558af CMake Nightly Date Stamp 2018-02-19 00:01:12 -05:00
Kitware Robot
33ace6eb91 CMake Nightly Date Stamp 2018-02-18 00:01:06 -05:00
Kitware Robot
3b6fe84cb7 CMake Nightly Date Stamp 2018-02-17 00:01:14 -05:00
Alex Turbov
689eeb67cb string: Add JOIN subcommand
This is just like CONCAT but accepts a glue string to put between
each value.  `JOIN ""` is equivalent to `CONCAT`.
2018-02-16 10:04:47 -05:00
Brad King
524696ec10 Merge topic 'file_cmd_touch'
e78e24f6 Replaces execute_process calls to touch files with file(TOUCH) calls
602988e1 Adds file(TOUCH) and file(TOUCH_NOCREATE) sub-commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1705
2018-02-16 09:39:47 -05:00
Brad King
d97c9ffb6c Merge topic 'genex-IN_LIST-operator'
5089f560 Genex: Add IN_LIST logical operator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1724
2018-02-16 09:22:56 -05:00
Kitware Robot
269722ae5b CMake Nightly Date Stamp 2018-02-16 00:01:12 -05:00
Shane Parris
602988e1e5 Adds file(TOUCH) and file(TOUCH_NOCREATE) sub-commands 2018-02-15 10:54:18 -05:00