Commit Graph

24245 Commits

Author SHA1 Message Date
Brad King
50b2d0c944 Merge topic 'misc-typos'
32f6b7a43b Fix misc typos in documentation and comments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1826
2018-03-08 09:58:19 -05:00
Brad King
1076ac9d68 Merge topic 'vs10-xmlmacros'
59d8cfb85e cmVisualStudio10TargetGenerator: Use helpers for XML tags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1813
2018-03-08 09:57:44 -05:00
Brad King
f0b412dd82 Merge topic 'avoid-LIB_DEPENDS'
7723e9a058 Do not produce legacy _LIB_DEPENDS cache entries
2124a1364a cmTarget: Remove unnecessary RecordDependencies member
1c5bfab532 cmTarget: Simplify ClearDependencyInformation implementation
910a9d608e cmTarget: Simplify ClearDependencyInformation signature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !1828
2018-03-08 09:55:09 -05:00
Brad King
ca2ac4979d Merge topic 'update-kwsys'
2c5b4359f8 Merge branch 'upstream-KWSys' into update-kwsys
64d4308d83 KWSys 2018-03-07 (2ad561e7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1830
2018-03-08 09:50:19 -05:00
Kitware Robot
458fc1de49 CMake Nightly Date Stamp 2018-03-08 00:01:12 -05:00
luz.paz
32f6b7a43b Fix misc typos in documentation and comments 2018-03-07 10:54:46 -05:00
Vitaly Stakhovsky
59d8cfb85e cmVisualStudio10TargetGenerator: Use helpers for XML tags
Make the XML generating code smaller, more structured, and less
error-prone.  This is a step towards future XML refactoring.
2018-03-07 08:51:30 -05:00
Brad King
7723e9a058 Do not produce legacy _LIB_DEPENDS cache entries
Introduce policy `CMP0073` to avoid producing these cache entries.

Fixes: #16364
2018-03-07 07:48:40 -05:00
Brad King
29b41babdb Merge topic 'ctest-affinity'
6be53c6695 CTest: Add options to control test process affinity to CPUs
c5428d8db2 libuv: disable process affinity during CMake bootstrap
24de561a1a libuv: unix,win: add uv_spawn option to set child CPU affinity mask
43d6e5a71f libuv: misc: add function to get CPU affinity mask size

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1814
2018-03-07 07:14:35 -05:00
Brad King
a6f1eabee0 Merge topic 'autogen-empty-source-file-fix'
50b7be6d1f Autogen: Check if a file is empty before reading it

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1825
2018-03-07 07:12:50 -05:00
Brad King
2c5b4359f8 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-03-07 (2ad561e7)
2018-03-07 06:48:34 -05:00
Kitware Robot
086f84aa20 CMake Nightly Date Stamp 2018-03-07 00:01:11 -05:00
Brad King
2124a1364a cmTarget: Remove unnecessary RecordDependencies member
Inline the condition in the one remaining place it is checked.
2018-03-06 14:38:23 -05:00
Brad King
1c5bfab532 cmTarget: Simplify ClearDependencyInformation implementation
Remove the `<target>_LIB_DEPENDS` cache entry unconditionally.
It will be populated again later if needed.  There is no need
to ask the user to remove the cache entry if the target type
changes.

Issue: #16364
2018-03-06 14:38:16 -05:00
Brad King
910a9d608e cmTarget: Simplify ClearDependencyInformation signature
We don't need to pass an argument with the target's own name.
2018-03-06 13:54:45 -05:00
Sebastian Holtermann
50b7be6d1f Autogen: Check if a file is empty before reading it
Calling `std::string::front()` on an empty string results
in an undefined behavior by the C++ standard.
In gcc8 it causes an assertion to fail.

This adds a check to `AUTOGEN` if a file to read is empty
and in case avoids the use of an empty `std::string` buffer.

Closes #17793
2018-03-06 08:35:08 -05:00
Kitware Robot
674c5b3066 CMake Nightly Date Stamp 2018-03-06 00:01:23 -05:00
Brad King
6be53c6695 CTest: Add options to control test process affinity to CPUs
In commit v2.8.0~170 (ENH: Added ctest test options PROCESSORS and
RUN_SERIAL, 2009-09-07) CTest learned to track the number of processors
allocated to running tests in order to balance it against the desired
level of parallelism.  Extend this idea by introducing a new
`PROCESSOR_AFFINITY` test property to ask that CTest run a test
with the CPU affinity mask set.  This will allow a set of tests
that are running concurrently to use disjoint CPU resources.
2018-03-05 09:21:32 -05:00
Brad King
49e777aeb1 Merge topic 'general_cleanup_enhance'
0a21d820d3 Remove c_str() from calls to converttorelativeformake in XCode Generator
f93cc4158e Refactor cmCacheManager::LoadCache to use ostringstream
915b71010c Enhance RunCMake test coverage for file(GLOB)
fcaa134c6c Refactor HandleGlobCommand
cf5d0b49e8 Adjust class description in cmFileTimeComparison.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1810
2018-03-05 09:02:14 -05:00
Brad King
dc38970f83 Merge topic 'object-library-linking'
7776ce98c3 Tests: Add cases for usage requirements of linked object libs
bafe655b11 Help: Document linking behavior of OBJECT libraries
57538224d0 objlib: Link object-files from `OBJECT` libraries.
9a7f039ee7 objlib: Allow `OBJECT` libraries to link to `OBJECT` libraries.
dfb6e84082 objlib: Allow other libraries to link to `OBJECT` libraries.
51249e69ea objlib: Allow `OBJECT` libraries to link to other libraries.
e22c45d4c9 Tests: Teach RunCMake to ignore AIX ld warnings about GNU atexit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Acked-by: John Drouhard <john@jmdtech.org>
Merge-request: !1524
2018-03-05 09:01:42 -05:00
Brad King
b39a9dd897 Merge topic 'def-generate-windows-only'
1ac042aa67 Do not generate rules for .def generation where not supported

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1809
2018-03-05 09:00:30 -05:00
Kitware Robot
2fbd77124e CMake Nightly Date Stamp 2018-03-05 00:01:06 -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
Deniz Bahadir
57538224d0 objlib: Link object-files from OBJECT libraries.
Note: This finally links the object-files of the `OBJECT` library from
the right-hand side of `target_link_libraries` to the target on the
left-hand side. However, this will only happen with directly linked
`OBJECT` libraries, not with `OBJECT` libraries "linked" through
property `INTERFACE_LINK_LIBRARIES` of a target on the right-hand side!

Fixes: #14778
2018-03-01 09:24:25 -05:00
Deniz Bahadir
9a7f039ee7 objlib: Allow OBJECT libraries to link to OBJECT libraries.
Note: This still does not link the object-files of the `OBJECT` library
from the right-hand side of `target_link_libraries` to the target on the
left-hand side. (In this particular case of another `OBJECT` library on
the left-hand side this would not make any sense anyway. The target on
the left-hand side has no link-step.)

Issue: #14778
2018-03-01 09:24:25 -05:00
Deniz Bahadir
dfb6e84082 objlib: Allow other libraries to link to OBJECT libraries.
Note: This only allows `OBJECT` libraries to be on the right-hand side
of `target_link_libraries` but still does not link its object-files to
the target on the left-hand side.

Issue: #14778
2018-03-01 09:24:24 -05:00
Deniz Bahadir
51249e69ea objlib: Allow OBJECT libraries to link to other libraries.
The proper way to use libraries is now through `target_link_libraries`
for things such as usage requirements, compile definitions, include
directories, etc. To facilitate this, allow `OBJECT` libraries to "link"
to other libraries.

Co-Author: Ben Boeckel <ben.boeckel@kitware.com>
Issue: #14778
2018-03-01 09:24:24 -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
Shane Parris
0a21d820d3 Remove c_str() from calls to converttorelativeformake in XCode Generator 2018-02-28 09:51:42 -05:00
Shane Parris
f93cc4158e Refactor cmCacheManager::LoadCache to use ostringstream 2018-02-28 09:34:47 -05:00
Shane Parris
fcaa134c6c Refactor HandleGlobCommand 2018-02-28 09:34:47 -05:00
Shane Parris
cf5d0b49e8 Adjust class description in cmFileTimeComparison.h 2018-02-28 09:34:47 -05:00
Brad King
1ac042aa67 Do not generate rules for .def generation where not supported
Our `cmake -E __create_def` helper used for `WINDOWS_EXPORT_ALL_SYMBOLS`
and merging of multiple `.def` files is available only with CMake hosted
on Windows.  However, we may generate use of it on other platforms since
commit v3.9.0-rc1~405^2 (Support WINDOWS_EXPORT_ALL_SYMBOLS with `.def`
files, 2017-03-13) when multiple `.def` files are listed.  This results
in a build error because the tool doesn't exist.

Fix our logic to avoid using the tool on non-Windows platforms.  Instead
silently ignore all but the first `.def` source as we did before.

Issue: #17773
2018-02-28 08:52:19 -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
Brad King
ac925ec09e CMake 3.11.0-rc2 2018-02-27 09:34:35 -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