Commit Graph

8220 Commits

Author SHA1 Message Date
Marc Chevrier
50b8dc8735 Merge topic 'cmake_path-stabilization'
76f0bcdfb6 cmake_path: various updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5695
2021-01-15 05:47:02 -05:00
Brad King
cc47f4ebf9 Merge topic 'fileapi-toolchains'
6418dabb87 Tests: Add test for toolchains-v1 File API object
1c5bd1bed5 Tests: Add toolchains kind to capabilities test
f72bb2ee0d Help: Add documentation for "toolchains" object kind
bb069c0857 cmFileAPI: Add "toolchains" object kind.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5678
2021-01-14 13:02:54 -05:00
Brad King
224956255d Merge topic 'fuzz1'
b0107165b7 Tests: Add a fuzzer for oss-fuzz

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5668
2021-01-14 13:01:22 -05:00
Brad King
967d1f7dde Merge topic 'install-FILES-rename-genex'
ac3ccc393e install(files): Support genex in rename option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5694
2021-01-14 13:00:16 -05:00
Marc Chevrier
76f0bcdfb6 cmake_path: various updates
To follow discussions in #21385 and !5682:
* Fix bug in cmCMakePath::IsSuffix() method
* cmake_path(HASH) always normalized paths (NORMALIZE option removed)
2021-01-13 15:27:49 +01:00
Brad King
438ed46c13 Merge topic 'ExternalProject-configure-handled-by-build'
7155e358c9 ExternalProject: Add CONFIGURE_HANDLED_BY_BUILD option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5626
2021-01-13 09:21:47 -05:00
Brad King
27c2579efd Merge topic 'issue-21663'
38e2299fc8 list(REMOVE_ITEM): Make removal of an empty item a no-op.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5693
2021-01-13 09:21:00 -05:00
Brad King
00d8a1dff8 Merge topic 'depend_make_refine'
4d509437cb cmDepends: disable long line dependencies for nmake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5689
2021-01-13 09:20:13 -05:00
AdamKorcz
b0107165b7 Tests: Add a fuzzer for oss-fuzz 2021-01-13 11:04:59 +00:00
Asit Dhal
ac3ccc393e install(files): Support genex in rename option
Fixes: #19903
2021-01-13 11:27:56 +01:00
Ben McMorran
6418dabb87 Tests: Add test for toolchains-v1 File API object 2021-01-12 15:43:38 -08:00
Ben McMorran
1c5bd1bed5 Tests: Add toolchains kind to capabilities test 2021-01-12 14:25:39 -08:00
Brad King
db8e2e711a Merge topic 'ninja-multi-config-post-build'
98805a11ce Ninja Multi-Config: Run POST_BUILD when BYPRODUCTS don't overlap

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5673
2021-01-12 10:25:07 -05:00
Brad King
b7485c98a0 Merge topic 'trace_expand_bracket'
e6e7f2cab9 cmMakefile: Don't expand bracket arguments in --trace-expand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5687
2021-01-12 10:20:26 -05:00
Daan De Meyer
7155e358c9 ExternalProject: Add CONFIGURE_HANDLED_BY_BUILD option
Fixes #21592.
2021-01-12 08:50:02 +01:00
Asit Dhal
38e2299fc8 list(REMOVE_ITEM): Make removal of an empty item a no-op.
Fixes: #21663
2021-01-12 08:27:40 +01:00
Raul Tambre
e6e7f2cab9 cmMakefile: Don't expand bracket arguments in --trace-expand
Bracket arguments are literal and shouldn't be expanded.

Fixes #21671.
2021-01-11 19:54:18 +02:00
Kai Wang
4d509437cb cmDepends: disable long line dependencies for nmake
This is a follow-up to commit b696f78073 (cmDepends: merge dependers of
depend makefile, 2020-12-18).  NMake of visual studio has many versions
that not support long line dependencies of make rule.

Signed-off-by: Wangkai <wangkai86@huawei.com>
Fixes: #21681
2021-01-11 12:14:04 -05:00
Brad King
38335f275f Merge topic 'xcode-object-ids'
b8b6573db8 Xcode: Use deterministic object ids for script build phases
2892228dc9 cmGlobalXCodeGenerator: Add infrastructure for deterministic object ids
d250b67722 cmGlobalXCodeGenerator: Adopt pbxproj object id generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5671
2021-01-08 09:07:18 -05:00
Kyle Edwards
98805a11ce Ninja Multi-Config: Run POST_BUILD when BYPRODUCTS don't overlap
Fixes: #21252
2021-01-07 11:26:17 -05:00
Brad King
520df2880b Merge topic 'fix-21620'
8cb8dd6da5 AutoMoc: Re-run after adding Q_OBJECT macro
fefba42e37 Add a failing test case for #21620
2999c40dd9 Extend QtAutogen/RerunMoc
f623664e87 Do not use try_compile in RerunMocBasic test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5642
2021-01-07 08:25:29 -05:00
Brad King
1cbbfbc78f Merge topic 'export-compile-commands-per-target'
a742b5d137 CMAKE_EXPORT_COMPILE_COMMANDS: allow configuration per target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5651
2021-01-07 08:22:27 -05:00
Brad King
455d016863 Merge topic 'vs_shader_flags-generator-expressions'
67775aaf5b VS: Add genex support to VS_SHADER_FLAGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5664
2021-01-07 08:21:25 -05:00
Brad King
b8b6573db8 Xcode: Use deterministic object ids for script build phases
The Xcode "new build system" only considers a script build phase up to
date if it has run before, even if outputs are newer than inputs.  Use a
deterministic object id for script build phases associated with custom
commands so that they do not need to re-run after CMake re-generates the
project.

Fixes: #21669
2021-01-06 18:46:30 -05:00
Joerg Bornemann
fefba42e37 Add a failing test case for #21620
Extend Qt(4|5)Autogen.RerunMocBasic to check the following situation:

Class MyObject3 is a QObject-derived class without Q_OBJECT macro.
It's declared in myobject3.h that is not included by any file that is
input of AutoMoc (this is why we had to add PlainObject).

If myobject3.h were included by main.cpp, then AutoMoc would already
track this dependency, because main.cpp has a Q_OBJECT macro.

After the initial build(s), the Q_OBJECT macro is added to myobject3.h,
and an incremental build is run. With Qt >= 5.15 and Ninja, the build
fails, because AutoMoc is not run due to the missing dependency to
myobject3.h.
2021-01-06 20:16:36 +01:00
Joerg Bornemann
2999c40dd9 Extend QtAutogen/RerunMoc
Test that removing / adding a Q_OBJECT macro doesn't break incremental
builds.

This was initially done to test the fix for #21620, but the test passes
without the fix. The reason is that test1.h is included by main.cpp, which
contains a Q_OBJECT macro, meaning that test1.h is in AutoMoc's
dependencies transitively.
2021-01-06 20:16:36 +01:00
Joerg Bornemann
f623664e87 Do not use try_compile in RerunMocBasic test
In a subsequent patch we want to extend RerunMocBasic to test the
removal and addition of Q_OBJECT macros works when building
incrementally.

For that, properly generated dependencies are necessary. Currently, the
MocBasic test project is configured using try_compile, and that turns
off the generation of depfiles.

Replace the try_compile call with execute_command calls that first
configure and then build the test project.
2021-01-06 20:16:36 +01:00
Brad King
0dcc03cd16 Tests: Fix ConfigSources test with Intel compiler on Windows
The test regularly fails updating the `vc*.pdb` compiler-generated
PDB file.  Add the `/Z7` flag as the compiler suggests for this.
2021-01-06 11:13:03 -05:00
Brad King
91f0f4aa73 Merge topic 'explicit-this-fix'
209daa20b2 Code style: add missed explicit 'this->'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5400
2021-01-06 10:20:57 -05:00
Brad King
c1a7de72e1 Merge topic 'depend_make_refine'
b696f78073 cmDepends: merge dependers of depend makefile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5631
2021-01-06 10:20:04 -05:00
Shannon Booth
a742b5d137 CMAKE_EXPORT_COMPILE_COMMANDS: allow configuration per target
The new target property `EXPORT_COMPILE_COMMANDS` associated with the
existing global variable can be used to optionally configure targets for
their compile commands to be exported.

Fixes: #19462
2021-01-06 11:51:39 +13:00
Jeremiah van Oosten
67775aaf5b VS: Add genex support to VS_SHADER_FLAGS 2021-01-05 17:07:01 +01:00
Brad King
522015e04f Merge topic 'java-export-native_headers'
53235626a2 UseJava: enable exportation of native headers target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5658
2021-01-05 09:02:12 -05:00
Brad King
78c95e5a1c Merge topic 'ninja-omit-empty-custom-command'
d43f4692e0 Ninja: Omit custom commands with an empty COMMAND

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5647
2021-01-05 09:01:12 -05:00
Kai Wang
b696f78073 cmDepends: merge dependers of depend makefile
Since one depender has multiple dependees, depend makefile generated
same depender line by line, to reduce file size and refine make file
parse speed, merge same dependers to one. And add a testcase for
large depend.make which generated source file includes 20000 header
files and run build and incremental build

Signed-off-by: Wangkai <wangkai86@huawei.com>
Signed-off-by: Zhaoyingdong <zhaoyingdong@huawei.com>
2021-01-05 07:48:27 -05:00
Oleksandr Koval
209daa20b2 Code style: add missed explicit 'this->'
CMake uses explicit 'this->' style. Using custom clang-tidy check we can
detect and fix places where 'this->' was missed.
2021-01-05 14:32:36 +02:00
Brad King
1883ef1cda Merge topic 'tests-bump-minver'
72e7c45e98 Tests: Bump CMake minimum required in tests to 2.8.12

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5644
2021-01-04 13:48:38 -05:00
Marc Chevrier
53235626a2 UseJava: enable exportation of native headers target 2020-12-29 17:14:20 +01:00
Marc Chevrier
f5cdcd0606 Merge topic 'makefiles-custom_command-depfile'
3eacf857e3 Tests: Add case for DEPFILE in add_custom_command
cfd8a5ac1f Makefiles: Add support of DEPFILE for add_custom_command
a526f71266 cmGccDepfileReader: Add new function ensuring paths are valid

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5617
2020-12-26 05:55:55 -05:00
Craig Scott
ef5b3eff4e Merge topic 'xcode-inherit-paths'
5115e8b2b6 Xcode: Generalize inheritance of project-level search paths
6b6230b23b cmGlobalXCodeGenerator: Factor out helper to append attribute

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5637
2020-12-23 19:11:21 -05:00
Shannon Booth
d43f4692e0 Ninja: Omit custom commands with an empty COMMAND
Fixes: #21063
2020-12-23 09:59:03 -05:00
Marc Chevrier
3eacf857e3 Tests: Add case for DEPFILE in add_custom_command
Issue: #20286, #21415
2020-12-23 15:47:56 +01:00
Marc Chevrier
cfd8a5ac1f Makefiles: Add support of DEPFILE for add_custom_command
Issue: #20286
Fixes: #21415
2020-12-23 15:47:46 +01:00
Chuck Atkins
72e7c45e98 Tests: Bump CMake minimum required in tests to 2.8.12
Since 3.19, CMake generates a deprecation warning when using a minimum
version less than 2.8.12.  This eliminates those warnings generated
during tests, which are typically hidden from the user and developer but
are being generated nonetheless.
2020-12-23 08:55:45 -05:00
Craig Scott
ce9a9e00a8 Merge topic 'fc-relative-SOURCE_DIR' into release-3.19
51595e5f01 FetchContent: Relative SOURCE_DIR override cannot be a hard error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5641
2020-12-22 15:49:37 -05:00
Craig Scott
88eefaac04 Merge topic 'fc-relative-SOURCE_DIR'
51595e5f01 FetchContent: Relative SOURCE_DIR override cannot be a hard error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5641
2020-12-22 15:49:37 -05:00
Brad King
ddd52aac54 Merge topic 'test-ConfigSources-config'
3af0671019 Tests: Fix ConfigSources test with empty CMAKE_BUILD_TYPE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5643
2020-12-22 13:49:29 -05:00
Brad King
72a28635b8 Merge topic 'issue-20134'
b68699b717 target_include_directories: Support AFTER option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5633
2020-12-22 09:13:08 -05:00
Brad King
3cf1a8c59b Merge topic 'issue-15653'
c3385dd8bd file(GENERATE): Support options to manipulate file permissions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5437
2020-12-22 09:12:20 -05:00
Brad King
5115e8b2b6 Xcode: Generalize inheritance of project-level search paths
Generalize the change from commit bffb17be3d (Xcode: Inherit target
library and framework search paths from project, 2020-11-04,
v3.19.0-rc3~4^2) to apply to framework and other kinds of search paths
added either for include directories or for linking.

Issue: #21617
2020-12-22 08:56:26 -05:00