Commit Graph

38886 Commits

Author SHA1 Message Date
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
Craig Scott 730eeceb75 Merge topic 'doc_test_prop_WORKING_DIRECTORY'
92a4c236f6 Help: Fix wrong default for WORKING_DIRECTORY test property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !1806
2018-02-28 16:46:15 -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 74dac86c76 Merge topic 'findjava-jar-in-dev-component'
596a7f262a FindJava: Add Java_JAR_EXECUTABLE to a component: Development

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1807
2018-02-28 08:16:52 -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
Giel van Schijndel 596a7f262a FindJava: Add Java_JAR_EXECUTABLE to a component: Development
All discovered executables were placed in a component, except for 'jar'.
This forced the use of find_package(Java) without any component
specification.  This commit adds 'jar' to the 'Development' component,
because that's what it's used for.
2018-02-27 17:32:09 +01:00
Brad King 4da456c7fe Merge branch 'release-3.11' 2018-02-27 10:40:05 -05:00
Brad King ac925ec09e CMake 3.11.0-rc2 v3.11.0-rc2 2018-02-27 09:34:35 -05:00
Brad King e73016bc06 Merge branch 'release-3.11' 2018-02-27 09:33:52 -05:00
Brad King 0b8db75b47 Merge topic 'contract-plplot'
4964fe1e Tests: Update PLplot contract test repository URL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1801
2018-02-27 09:27:43 -05:00
Brad King 2bcccd07bd Merge topic 'modules-restore-path-suffixes'
7b1c1424 Modules: Restore recently removed search path suffixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1802
2018-02-27 09:26:31 -05:00
Brad King 2edd5cb9e0 Merge topic 'unixtimefix'
e1cd936c Tests: Fix TIMESTAMP-UnixTime test under SOURCE_DATE_EPOCH=1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1800
2018-02-27 09:25:48 -05:00
Craig Scott 92a4c236f6 Help: Fix wrong default for WORKING_DIRECTORY test property 2018-02-27 22:28:33 +11: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 e708dac65f Merge branch 'modules-restore-path-suffixes' into release-3.11
Merge-request: !1802
2018-02-26 10:53:16 -05:00
Brad King 7b1c14241d Modules: Restore recently removed search path suffixes
Refactoring in commit v3.11.0-rc1~293^2~4 (Modules: Remove paths set as
global Unix prefixes, 2017-11-20) removed `PATH_SUFFIXES` options that
appeared to be used to cover subdirectories of the `PATHS` options that
were also removed.  However, the path suffixes also apply to other
search paths and so should not be removed.  Restore them.

Fixes: #17760
2018-02-26 10:52:11 -05:00
Brad King be9731965e Merge branch 'unixtimefix' into release-3.11
Merge-request: !1800
2018-02-26 10:36:26 -05:00
Bernhard M. Wiedemann e1cd936c62 Tests: Fix TIMESTAMP-UnixTime test under SOURCE_DATE_EPOCH=1
The test was expecting timestamps on day 1 in 1970 to start at 86400 but
they actually started at 0.  This worked without `SOURCE_DATE_EPOCH=1`
because after 1972, leap days compensated the offset.

Fixes: #17762
2018-02-26 10:35:30 -05:00
Brad King 4964fe1e5a Tests: Update PLplot contract test repository URL
Use a `git://` protocol URL documented by the repository hosting
infrastructure.  After some updates to that infrastructure, the
`https://` URL with the `.git` extension no longer works reliably.
2018-02-26 09:33:56 -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 e4df2313c1 Merge topic 'ipo-support'
a18147e9 MSVC,Clang,Flang: Add IPO support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1721
2018-02-26 08:59:32 -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
xoviat a18147e933 MSVC,Clang,Flang: Add IPO support
Fixes: #17692
2018-02-23 10:27:57 -05: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 ebf0a08279 Merge branch 'release-3.11' 2018-02-23 08:50:40 -05: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
Brad King 72a85d9f0b Merge branch '14297-partial-xcode-zero-check' into release-3.11
Merge-request: !1790
2018-02-23 08:17:51 -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 36fc89b7d9 Merge branch 'std-thread-link' into release-3.11
Merge-request: !1789
2018-02-22 13:15:58 -05: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 020be379f4 Merge topic 'fortran-compiler'
965f977c Fortran: Adjust compiler candidates based on host platform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1780
2018-02-22 11:37:10 -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