Commit Graph

8192 Commits

Author SHA1 Message Date
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
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
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
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
Brad King
3af0671019 Tests: Fix ConfigSources test with empty CMAKE_BUILD_TYPE
The test requires a non-empty `CMAKE_BUILD_TYPE` to function on
single-config generators.  Force a non-empty configuration if the test
is configured explicitly with empty `-DCMAKE_BUILD_TYPE=`.
2020-12-21 21:27:35 -05:00
Craig Scott
51595e5f01 FetchContent: Relative SOURCE_DIR override cannot be a hard error
Fixes: #21624
2020-12-22 11:09:18 +11:00
Brad King
9ab77201f7 Apple: Fix linking to frameworks that do not exist until build time
Fixes: #21621
2020-12-21 11:50:54 -05:00
Brad King
05a59f37ab Merge topic 'ctest-test-dir'
dbcf86d24d Ctest: Support build tree on command line

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5623
2020-12-21 10:04:58 -05:00
Asit Dhal
c3385dd8bd file(GENERATE): Support options to manipulate file permissions
Fixes: #15653
2020-12-21 12:16:16 +01:00
Asit Dhal
b68699b717 target_include_directories: Support AFTER option
Fixes: #20134
2020-12-19 14:51:39 +01:00
Brad King
6d7621baea Merge topic 'qt-autogen-per-config'
20e4db4a66 cmGeneratorTarget: Make GetConfigCommonSourceFiles Xcode-specific
92d7b456e5 Autogen: Add support for per-config sources
3ffebbaefb Tests/QtAutogen: Forward build configuration in multi-config generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5624
2020-12-17 13:22:40 -05:00
Asit Dhal
dbcf86d24d Ctest: Support build tree on command line
Fixes: #21268
2020-12-17 05:01:03 +01:00
Brad King
92d7b456e5 Autogen: Add support for per-config sources
Fixes: #20682
2020-12-16 14:04:30 -05:00
Brad King
3ffebbaefb Tests/QtAutogen: Forward build configuration in multi-config generators 2020-12-16 10:09:09 -05:00
Craig Scott
d2456b29f4 Merge topic 'unity-anon-ns'
0fe9c40494 Unity Build: Add option for generating per-file unique id

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4784
2020-12-16 07:40:41 -05:00
Brad King
34469a4f71 Merge topic 'custom-command-output-genex-nmc'
1526ae3aba Tests: Add cases for Ninja Multi-Config cross-config custom commands
dcf9f4d2f7 Ninja Multi-Config: Add support for cross-config custom commands
15467f12f7 cmLocalGenerator: Adopt custom target 'force' output name generation
7b64b0cd5a cmLocalGenerator: Refactor custom command generator construction
d29da8ed3e cmMakefile: Simplify custom target 'force' output name generation
2b1cc175ee Help: Clarify version adding add_custom_{command,target} OUTPUT genex support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5612
2020-12-16 06:20:39 -05:00
Brad King
1526ae3aba Tests: Add cases for Ninja Multi-Config cross-config custom commands 2020-12-15 08:17:55 -05:00
Brad King
807c903c55 Merge topic 'issue-20915'
6d0712c225 file(configure): Order of named options should be specified in any order

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5608
2020-12-15 07:43:36 -05:00
Brad King
38acdc5d3a Merge topic 'issue-21557-test-cases'
8851637e9f cmake_policy: Implement test cases for cmake_policy VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5610
2020-12-15 07:42:56 -05:00
Brad King
7932e0a46e Merge topic 'ispc_control_header_suffixes' into release-3.19
c9a50f3556 ISPC: Generated Headers suffix configurable with a better default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5597
2020-12-15 07:40:34 -05:00
Brad King
67f12dd1d6 Merge topic 'ispc_control_header_suffixes'
c9a50f3556 ISPC: Generated Headers suffix configurable with a better default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5597
2020-12-15 07:40:34 -05:00
Kyle Edwards
dcf9f4d2f7 Ninja Multi-Config: Add support for cross-config custom commands
Co-Author: Brad King <brad.king@kitware.com>
2020-12-15 07:01:21 -05:00
Stephen Kelly
0fe9c40494 Unity Build: Add option for generating per-file unique id
Fixes: #21477
2020-12-15 22:26:09 +11:00
Marc Chevrier
55c3b6a77e CMakePackageConfigHelpers: Relax restrictions on version range 2020-12-15 09:24:09 +11:00
Robert Maynard
c9a50f3556 ISPC: Generated Headers suffix configurable with a better default
The target property `ISPC_HEADER_SUFFIX` and associated global
variable now can control the suffix used when generating the
C/C++ interoperability ISPC headers.

In addition the default suffix is now "_ispc.h" which matches the
common convention that the ISPC compiler team uses and recommends.
2020-12-14 13:13:09 -05:00
Marc Chevrier
7f44760991 CMakePackageConfigHelpers: Relax restrictions on version range 2020-12-14 14:42:26 +01:00
Brad King
fedfe763ee Merge topic 'custom-command-output-genex'
c257c25419 add_custom_{command,target}: Add genex support to OUTPUT and BYPRODUCTS
f36af9228b cmLocalGenerator: Evaluate generator expressions in custom command outputs
c887cefd9a cmLocalGenerator: Simplify custom command output cmSourceFile creation
947ba01bf9 cmLocalGenerator: Factor out helper to expand custom command output paths
1902d28ebc cmLocalGenerator: Refactor UpdateOutputToSourceMap to avoid boolean trap
e4034eabe9 cmLocalGenerator: Re-order logic in CreateGeneratedSource
706c48301d cmCustomCommandGenerator: Treat relative outputs w.r.t. build dir
5d23c5446e cmCustomCommandGenerator: Refactor OUTPUT and DEPENDS path evaluation
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !5402
2020-12-14 07:22:45 -05:00
Brad King
04ed1e73dd Merge topic 'execute_process-command-error' into release-3.19
e5a4ffaad1 execute_process: Improve COMMAND_ERROR_IS_FATAL error capture scenarios

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5588
2020-12-14 07:07:46 -05:00
Brad King
922ad5c6b9 Merge topic 'execute_process-command-error'
e5a4ffaad1 execute_process: Improve COMMAND_ERROR_IS_FATAL error capture scenarios

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5588
2020-12-14 07:07:46 -05:00
Asit Dhal
8851637e9f cmake_policy: Implement test cases for cmake_policy VERSION 2020-12-14 04:55:03 +01:00
Asit Dhal
6d0712c225 file(configure): Order of named options should be specified in any order
Fixes: #20915
2020-12-13 09:45:11 +01:00
Brad King
794aa36b1f Merge topic 'apple-silicon-host-arch'
b7f0327dcd Tests: Cover macOS host architecture selection on Apple Silicon hosts
5f882f6ce5 macOS: Offer control over host architecture on Apple Silicon hosts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5589
2020-12-11 13:05:34 -05:00