Commit Graph

49506 Commits

Author SHA1 Message Date
Brad King c0e4a0bd82 cmake: Update --help output to discourage use of --find-package mode
Fixes: #21056
2020-08-04 12:02:54 -04:00
Marc Chevrier 50e53eaed9 UseSWIG: Take care of support files in sub-directories
Fixes: #20833
2020-08-04 16:19:10 +02:00
Brad King 1f1feb72f8 Help: Document in add_library that IMPORTED_IMPLIB is for DLL import libs
Fixes: #21053
2020-08-04 09:29:42 -04:00
Kitware Robot 5becf28f92 CMake Nightly Date Stamp 2020-08-04 00:01:15 -04:00
Alexandru Croitor 7445c9a58a AutoGen: Add test to check for correct AutoMoc dependencies
When using Qt 5.15.0 or above together with Ninja, check that touching
a source file of a dependency does not needlessly re-run AUTOMOC for
the dependee target.
2020-08-03 19:38:16 +02:00
Alexandru Croitor a79056bb02 AutoGen: Fix over-specified direct dependencies of custom command
The AutoMoc timestamp creating custom command explicitly depended
on all dependencies of the origin target (associated to the AutoGen
target).

When an origin target depended on a shared library 'libfoo.so',
if it was re-linked, the AutoMoc custom command would touch its
output timestamp file, and thus cause needless rebuilding of sources,
despite the shared library not having any influence on the AutoMoc
generated files.

Introduce a new '<target>_autogen_timestamp_deps' utility target,
which will serve as an 'order-only' dependency for the custom command.

This will prevent needless rebuilding, because touching 'libfoo.so'
will not cause the custom command to be re-executed.

The new AutoMoc dependency tree looks like:
    '_autogen_timestamp_deps (serves as order-only dep)'
 <- '<target_autogen>/timestamp' file ( + moc deps file)
 <- '<target>_autogen' target.

Fixes: #21020
2020-08-03 19:38:11 +02:00
Ben McMorran 67599c7ada cmGeneratedFileStream: Add WriteRaw method 2020-08-03 12:56:41 -04:00
Fred Baksik f76c20da63 Toolchain: Test compiler initial settings 2020-08-03 12:34:46 -04:00
Fred Baksik db486da265 Toolchain: Update documentation for initial compiler flags 2020-08-03 12:34:46 -04:00
Brad King 507fecd7e2 Merge branch 'ninja-multi-rsp-remove-path' into release-3.17
Merge-request: !5094
2020-08-03 12:25:10 -04:00
Kyle Edwards cdb50af2f6 Ninja: Restore shorter path to response files
In commit 99ed39b011 (Ninja Multi-Config: Make link response files
per-config, 2020-07-15, v3.17.4~3^2), we added the target directory to
the response file under the mistaken assumption that two different
targets with the same name could be in different directories. However,
this causes the path to the response file to be too long to fit on a
command line.  Take the path back out, while leaving in the per-config
split.

Fixes: #21050
2020-08-03 12:14:16 -04:00
Laurits Riple 8829d2caba GoogleTest: Restore support for list arguments in TEST_EXECUTOR
Refactoring in commit 889a7146ff (GoogleTestAddTests: Refactor into
callable method, 2020-03-16, v3.18.0-rc1~450^2~3) accidentally
parsed `TEST_EXECUTOR` as a single-value argument instead of a list.
2020-08-03 12:10:58 -04:00
Robert Maynard 2cc1159653 Help: Clarify what MSVC compilers ignore <LANG>_STANDARD_REQUIRED
Fixes #20953
2020-08-03 11:58:04 -04:00
Brad King 9e643517ab Merge topic 'remove_unneeded_empty_language_variables'
59ece01e6c ASM: Remove unneeded empty variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5083
2020-08-03 11:19:13 -04:00
Brad King afb998704e Remove filtering of allowed INTERFACE library properties
Previously we disallowed use of arbitrary properties on INTERFACE
libraries.  The goal was to future-proof projects using them by not
allowing properties to be set that may affect their future inclusion in
the generated buildsystem.  In order to prepare to actually include
INTERFACE libraries in the generated buildsystem, drop the filter and
allow arbitrary properties to be set.

Issue: #19145
2020-08-03 10:04:23 -04:00
Brad King e7edba2baf Makefiles: Use IsInBuildSystem in global generator target type checks
Follow up from commit 422d9a0ab2 (Factor out generator checks for
filtering out interface libraries, 2020-07-20) with more uses of
`IsInBuildSystem`.
2020-08-03 10:04:22 -04:00
Kitware Robot 4b1e2449fa CMake Nightly Date Stamp 2020-08-03 00:01:07 -04:00
Kitware Robot 508e25e21e CMake Nightly Date Stamp 2020-08-02 00:01:11 -04:00
Craig Scott bda967bcb9 Merge topic 'doc-add_library-updates'
ee5b58f491 Help: State in add_library that INTERFACE libraries have no build targets
99b1e85f07 Help: Consolidate add_library documentation on IMPORTED libraries
716e76be3e Help: Re-order add_library sections
1b0adeea81 Help: Clarify target_sources PRIVATE/PUBLIC/INTERFACE scopes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5086
2020-08-01 19:59:55 -04:00
Kitware Robot 03d3cc1136 CMake Nightly Date Stamp 2020-08-01 00:01:06 -04:00
Stephan Rohmen 57f250dcc0 Graphviz: Fix issue with too many open file streams on Windows platform
Fixes #20931
2020-07-31 22:26:08 +02:00
Brad King ee5b58f491 Help: State in add_library that INTERFACE libraries have no build targets 2020-07-31 12:04:17 -04:00
Brad King 99b1e85f07 Help: Consolidate add_library documentation on IMPORTED libraries
Move documentation on IMPORTED INTERFACE libraries to the main section
on Imported Libraries.  Revise the section to clarify the different
kinds of imported libraries that can be created and what properties they
need.

Issue: #18975
2020-07-31 11:40:15 -04:00
Brad King 716e76be3e Help: Re-order add_library sections
Put all the sections that create in-project targets first,
and move Imported Libraries and Alias Libraries at the end.
2020-07-31 11:22:28 -04:00
Brad King 1b0adeea81 Help: Clarify target_sources PRIVATE/PUBLIC/INTERFACE scopes 2020-07-31 10:32:59 -04:00
Kitware Robot 383090bf59 CMake Nightly Date Stamp 2020-07-31 00:01:10 -04:00
Robert Maynard 7cc815a2a6 CUDAToolkit: Detect CUDA SDK that don't have nvcc
When a CUDA sdk doesn't have nvcc, defer to the existence of
a version.txt file. When we do this fall back we also reconstruct
the CUDA version via version.txt

Fixes #20643
2020-07-30 15:56:52 -04:00
Robert Maynard 59ece01e6c ASM: Remove unneeded empty variables 2020-07-30 13:46:18 -04:00
Brad King 1362f27194 Merge branch 'release-3.18' 2020-07-30 13:34:01 -04:00
Brad King 63a65baf4c CMake 3.18.1 v3.18.1 2020-07-30 12:34:59 -04:00
Brad King 3a02920547 Merge branch 'release-3.18' 2020-07-30 12:32:49 -04:00
Brad King d908a890eb Merge branch 'release-3.17' into release-3.18 2020-07-30 12:32:16 -04:00
Brad King a98083401e Merge branch 'release-3.17' 2020-07-30 11:51:57 -04:00
Brad King 103d6faed9 CMake 3.17.4 v3.17.4 2020-07-30 10:30:07 -04:00
Brad King 533a6256a3 Merge topic 'clang-msvc-cxx-std' into release-3.18
21e497fe63 Clang: Fix fallback compile features when simulating old MSVC versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5082
2020-07-30 08:39:58 -04:00
Brad King fe3bdcff52 Merge branch 'release-3.18' 2020-07-30 08:39:58 -04:00
Brad King 3d27b17347 Merge topic 'clang-msvc-cxx-std'
21e497fe63 Clang: Fix fallback compile features when simulating old MSVC versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5082
2020-07-30 08:39:58 -04:00
Brad King 2fdb7c5cf4 Merge topic 'unity_no_skip_autogen' into release-3.18
7051250a6c Unity Builds: Do not set SKIP_AUTOGEN to source files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5081
2020-07-30 08:28:49 -04:00
Brad King 6cc3c171f6 Merge branch 'release-3.18' 2020-07-30 08:28:49 -04:00
Brad King 8878f59cf9 Merge topic 'unity_no_skip_autogen'
7051250a6c Unity Builds: Do not set SKIP_AUTOGEN to source files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5081
2020-07-30 08:28:49 -04:00
Brad King 6152011cd0 Merge topic 'GoogleTest-fix-generated-include'
832858195e GoogleTest: Fix include path in the generated file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5063
2020-07-30 08:27:11 -04:00
Kitware Robot 3595e37519 CMake Nightly Date Stamp 2020-07-30 00:01:12 -04:00
Brad King 21e497fe63 Clang: Fix fallback compile features when simulating old MSVC versions
Refactoring in commit 25439c7d62 (Clang: Refactor CXX standard flags
into __compiler_clang_cxx_standards(), 2020-03-16, v3.18.0-rc1~362^2~4)
accidentally broke the `cxx_std_*` fallback feature names.

Issue: #21033
2020-07-29 13:02:21 -04:00
Cristian Adam 7051250a6c Unity Builds: Do not set SKIP_AUTOGEN to source files
Fixes: #21028
2020-07-29 17:57:50 +02:00
Fred Baksik deec2f587c Toolchain: Take CMAKE_<lang>_FLAGS_INIT into account during compiler detection
Fixes: #20040
2020-07-29 11:51:27 -04:00
Fred Baksik ca899af3e2 Toolchain: Handle repeated invocations of CMake with -DCMAKE_C_COMPILER
Repeated invocations of `cmake ... -DCMAKE_C_COMPILER=gcc` should not
trigger a "You have changed variables" message even though the cache
value of CMAKE_C_COMPILER changes from '/path/to/gcc' to 'gcc'.

Make repeated invocations of `cmake ... -DCMAKE_C_COMPILER=gcc;-pipe`
not trigger the warning by comparing the compiler name portion of the list to
the compiler being used.
2020-07-29 11:51:27 -04:00
Fred Baksik 12ba89e142 Toolchain: Make `/path/comp;-argn' behave the same as 'comp;-argn'
When using `cmake ... -DCMAKE_C_COMPILER=gcc;-pipe` first invocation of
CMake worked correctly.

When using `cmake ... -DCMAKE_C_COMPILER=/path/to/gcc;-pipe` first
invocation  of CMake detected a change to CMAKE_C_COMPILER, printed "You
have changed variables" message, and re-ran the initial compiler tests
after configuration was complete and before generation of the project
files.

The difference was due to the cache being forced updated with the new
value of CMAKE_C_COMPILER so that the comparison check passes.
2020-07-29 11:51:18 -04:00
Brad King 37e27aa552 Merge topic 'fixup_bundle_item-fix'
45ed314bff BundleUtilities: do not run install_name_tool on scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5071
2020-07-29 08:12:25 -04:00
Brad King b7522e48a4 Merge topic 'use_COMPILER_TARGET_to_set_architecture_for_clang_cl'
270e0d9c4d Detect the correct target architecture for clang compilers.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5058
2020-07-29 08:11:50 -04:00
Brad King 62d876e4e3 Merge topic 'cmcomputecomponentgraph-compute-method'
bd0d03386b cmComputeComponentGraph: Move work out of constructor into Compute() method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5079
2020-07-29 08:10:57 -04:00