Commit Graph

40558 Commits

Author SHA1 Message Date
Craig Scott
2a2f0ac231 Help: Clarify handling of non-integer components in if() version tests 2018-09-17 18:12:08 +08:00
Kitware Robot
18eb4c637a CMake Nightly Date Stamp 2018-09-15 00:01:15 -04:00
Brad King
333804fa0e Merge topic 'out-of-dir-linking'
a1ad0a699b target_link_libraries: Allow use with targets in other directories
9bbae5ae28 cmTarget: Future-proof AddLinkLibrary target lookup scope
f9cb6f618a cmExportFileGenerator: Use cmGeneratorTarget::ResolveTargetReference
18441a6269 cmGeneratorTarget: Factor target name resolution out of link item resolution
2f708f5d65 Make internal TARGET_PROPERTY generator expressions more robust
94a75801c8 Android.mk: De-duplicate link libraries logic during export
8a63b23d16 cmGlobalGenerator: Remove unused FindLocalGenerator method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Patrick Stotko <stotko@cs.uni-bonn.de>
Merge-request: !2370
2018-09-14 13:25:07 -04:00
Brad King
88e6e35358 Merge topic 'module_policy_protection'
8ede35523e IN_LIST: Ensure policy allows if(IN_LIST) if used by a module
e549e31f79 CMakeIOSInstallCombined: Prevent policy leakage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2375
2018-09-14 13:23:10 -04:00
Brad King
cff5151822 Merge topic 'boost-notfound'
ee300dc25d FindBoost: Suppress imported targets warning if Boost was not found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2376
2018-09-14 13:22:18 -04:00
Brad King
14a4f9a361 Merge topic 'ctest-stop-time-test'
ed71ec7579 CTest: Improve stop-time implementation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2378
2018-09-14 13:21:26 -04:00
Brad King
7c94434351 Merge topic 'test-ninja-sub-build-fs-delay'
bdd0e2d709 Tests: Extend RunCMake.Ninja filesystem delays

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2310
2018-09-14 13:20:27 -04:00
Kitware Robot
f0c84346ed CMake Nightly Date Stamp 2018-09-14 00:01:04 -04:00
Kitware Robot
98e6877d1e CMake Nightly Date Stamp 2018-09-13 00:01:06 -04:00
Brad King
a1ad0a699b target_link_libraries: Allow use with targets in other directories
Previously the command did not allow naming targets on the LHS that
were not created in the calling directory.  Lift this restriction to
enable more flexible use by projects.

Targets named on the RHS will need to be looked up during generation in
the scope of the call site rather than the scope of the LHS target.
Introduce an internal syntax in `[INTERFACE_]LINK_LIBRARIES` properties
to specify target names that need to be looked up in a directory other
than that containing the target on which the property is set.  Add
minimal documentation of the syntax to help users that encounter it.

Unfortunately CMake previously did allow such calls in the case that
only `INTERFACE` libraries are specified, but those libraries would be
looked up in the target's directory rather than the caller's.  Add
policy `CMP0079` to enable the new behavior with new lookup scope in a
compatible way.

Fixes: #17943
2018-09-12 13:06:36 -04:00
Brad King
9bbae5ae28 cmTarget: Future-proof AddLinkLibrary target lookup scope
The `AddLinkLibrary` method takes a `cmMakefile` pointer to represent
the scope of the caller that wants to link to the named library.
Currently in all call sites this is the same as the target's `Makefile`
member, but in principle the library named by the caller is visible in
its scope so we should use the `cmMakefile` it provided to look up the
library target.
2018-09-12 12:46:51 -04:00
Brad King
f9cb6f618a cmExportFileGenerator: Use cmGeneratorTarget::ResolveTargetReference
Avoid calling `FindGeneratorTargetToUse` directly.
2018-09-12 12:46:51 -04:00
Brad King
18441a6269 cmGeneratorTarget: Factor target name resolution out of link item resolution 2018-09-12 12:46:51 -04:00
Brad King
2f708f5d65 Make internal TARGET_PROPERTY generator expressions more robust
While collecting usage requirements from the `INTERFACE_*` properties of
directly linked targets, we internally generate `TARGET_PROPERTY:` and
`TARGET_OBJECTS:` generator expressions to refer to those properties on
those targets.  At the point we generate these expressions we already
have a pointer to an exact `cmGeneratorTarget` instance.

Switch from using the target name in these generator expressions to
using an internal unique name generated for each `cmGeneratorTarget`
instance to be referenced.  This avoids depending on the user-facing
target name to find the same target we already have.
2018-09-12 12:46:25 -04:00
Brad King
ed71ec7579 CTest: Improve stop-time implementation
The CTestTestStopTime test has been failing sporadically because the
stop time causes the first internal test to have a timeout short enough
that we might hit it and start the second test just before the stop time
is reached.  Instead we should track when a timeout is shortened in
order to stay within the stop time.  If a test times out for this reason
then we should consider the stop time reached and not start any more
tests.
2018-09-12 10:59:55 -04:00
Brad King
bdd0e2d709 Tests: Extend RunCMake.Ninja filesystem delays
On filesystems with 1s resolution the `run_sub_cmake` cases fail
occasionally when the 1 second sleep does not cause files to have
a different time.  Use 3 seconds instead.
2018-09-12 10:22:22 -04:00
Roger Leigh
ee300dc25d FindBoost: Suppress imported targets warning if Boost was not found
Fixes: #18330
2018-09-12 14:44:57 +01:00
Brad King
42212f7539 Merge topic 'rule-launch-custom-extra-space'
3e125c0c01 Ninja,Makefile: Drop extra space after RULE_LAUNCH_CUSTOM value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2372
2018-09-12 09:39:46 -04:00
Brad King
708b3fecfe Merge topic 'gicv-stdstring'
13d10ee616 cmState::GetInitializedCacheValue: Return as const std::string*

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2365
2018-09-12 09:38:37 -04:00
Brad King
1c1a1e08e8 Merge topic 'IAR_6_50_6_fix'
8fdf08c097 IAR: Fix compiler id, version, and arch detection on 6.50.6

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2371
2018-09-12 09:37:58 -04:00
Brad King
920ac301b5 Merge branch 'release-3.12' 2018-09-12 09:36:46 -04:00
Brad King
8bf5c2326e Merge topic 'FindDoxygen-CMP0057'
e8213404ce FindDoxygen: Ensure policy settings allow use of IN_LIST

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2373
2018-09-12 09:35:45 -04:00
Craig Scott
e7a45e3ec3 Merge topic 'unused-variables-cleanup'
2c154fec6b Warnings: Remove unused variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2364
2018-09-12 09:32:19 -04:00
Craig Scott
8ede35523e IN_LIST: Ensure policy allows if(IN_LIST) if used by a module 2018-09-12 14:50:16 +08:00
Craig Scott
e549e31f79 CMakeIOSInstallCombined: Prevent policy leakage
Functions do not introduce a new policy scope, so
surround these policy changes with a push-pop to
prevent them from affecting the caller.
2018-09-12 14:44:59 +08:00
Kitware Robot
f53bd80de1 CMake Nightly Date Stamp 2018-09-12 00:01:08 -04:00
Brad King
c1fd1607b8 Merge branch 'FindDoxygen-CMP0057' into release-3.12
Merge-request: !2373
2018-09-11 15:55:06 -04:00
Brad King
e8213404ce FindDoxygen: Ensure policy settings allow use of IN_LIST
In commit v3.9.0-rc1~55^2 (Improve Doxygen support, 2017-04-10)
use of the `IN_LIST` condition was added, but this is only supported
when policy CMP0057 is set to NEW.  Add a policy scope around the
module and enable the policy within it.  Otherwise it works only
in projects that happen to enable the policy.

Fixes: #18361
2018-09-11 15:52:43 -04:00
Brad King
3e125c0c01 Ninja,Makefile: Drop extra space after RULE_LAUNCH_CUSTOM value
The Ninja and Makefile generators were adding a space to the value both
before and after expanding rule variables.  Only the latter is needed.

While at it, revise some outdated comments since the rule variable
expansion is no longer responsible for inserting the launcher.

Suggested-by: Mate Pek <mate.pek@gmail.com>
Fixes: #18340
2018-09-11 14:18:10 -04:00
Brad King
94a75801c8 Android.mk: De-duplicate link libraries logic during export
Use the normal target link interface computation logic to get the
list of libraries in the link interface instead of trying to
interpret the `INTERFACE_LINK_LIBRARIES` property directly.
2018-09-11 13:17:11 -04:00
Daniel Schürmann
8fdf08c097 IAR: Fix compiler id, version, and arch detection on 6.50.6
The IAR 6.50.6 compiler places extra/truncated copies of the
compiler id `INFO:` strings into binaries with a prefix like
`?<Constant "`.  Teach CMakeDetermineCompilerId to ignore them.

Fixes: #18333
2018-09-11 10:43:03 -04:00
Craig Scott
344eb9c8dc Merge topic 'gtest_add_tests-empty-file'
31c82143bf GoogleTest: gtest_add_tests() fails if any source file is empty
d6b06d8d87 GoogleTest: Modify test to verify that empty files can be scanned

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2342
2018-09-11 09:42:31 -04:00
Brad King
528d7625b8 Merge topic 'iar-fail-early'
a26ebb894b IAR: Abort if compiler version or target architecture is not detected

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2353
2018-09-11 08:31:19 -04:00
Brad King
9a5b04a5f6 Merge topic 'cmake_cpack_command-doc'
5ff7149298 Help: Document existence of CMAKE_CPACK_COMMAND

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2367
2018-09-11 08:30:15 -04:00
Brad King
f13d4b1077 Merge topic 'replace-os-x-name-with-macos'
ab2e35d614 Replace occurrences of "Mac OS X" with "macOS" in comments
fc1602456a Help: Replace occurrences of "Mac OS X" with "macOS"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Gregor Jasny <gjasny@googlemail.com>
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Merge-request: !2351
2018-09-11 08:28:05 -04:00
Brad King
e9f72e9c94 Merge topic 'docs/setdirproprs'
6d8cabe8d4 Help: Clarify INCLUDE_DIRECTORIES directory property behavior
7b9d8ce168 Help: Clarify wording of set_directory_properties docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2337
2018-09-11 08:26:42 -04:00
Brad King
8a63b23d16 cmGlobalGenerator: Remove unused FindLocalGenerator method
This method has not been used since commit v3.4.0-rc1~234^2~1
(cmGlobalGenerator: Port Find API to cmMakefile, 2015-08-02).
2018-09-11 08:21:22 -04:00
Brad King
b1c8d95dbe Merge topic 'imported-same-name'
f35be59961 Fix transitive usage requirements through same-name imported targets
1b57f49586 genex: Simplify cmGeneratorExpressionInterpreter
bea390e9bd Fix dependency propagation through same-name imported targets
fc7e4d1ed8 cmLinkItem: Convert to a "sum type" over a string and target pointer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2359
2018-09-11 08:20:50 -04:00
Brad King
4188b8fd6a Merge branch 'release-3.12' 2018-09-11 08:19:44 -04:00
Brad King
dcbad14d23 Merge topic 'FindMPI-restore-flags-string'
e374b9f1eb FindMPI: Restore MPI_<LANG>_COMPILE_FLAGS as a command-line string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Christoph Junghans <junghans@votca.org>
Reviewed-by: Christian Pfeiffer <cpfeiffer@live.de>
Merge-request: !2368
2018-09-11 08:18:55 -04:00
Brad King
bb59e362cc Merge topic 'fix-ctest_start-track'
09f0325eaf CTest: Fix regression in ctest_start()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2366
2018-09-11 08:18:08 -04:00
Brad King
c669b59095 Merge topic 'ctest-fix-test-load'
292ec157b6 CTest: Fix --test-load regression

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2362
2018-09-11 08:12:09 -04:00
Craig Scott
78d165c990 Merge topic 'generator_expressions_typo_fix'
3914108c4a Help: Formatting typo fix in cmake-generator-expressions(7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2360
2018-09-11 05:51:03 -04:00
Craig Scott
151fc66827 Merge topic 'cmake-host-system-information-doc-fix'
228a2b0d82 Help: Clarify cmake_host_system_information memory units

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2339
2018-09-11 05:48:43 -04:00
Kitware Robot
e895a8f050 CMake Nightly Date Stamp 2018-09-11 00:01:07 -04:00
Craig Scott
2c154fec6b Warnings: Remove unused variables 2018-09-11 10:20:35 +08:00
Brad King
e0e56abe34 Merge branch 'FindMPI-restore-flags-string' into release-3.12
Merge-request: !2368
2018-09-10 14:52:39 -04:00
Brad King
3eda5cdd93 Merge branch 'fix-ctest_start-track' into release-3.12
Merge-request: !2366
2018-09-10 14:35:59 -04:00
Brad King
e374b9f1eb FindMPI: Restore MPI_<LANG>_COMPILE_FLAGS as a command-line string
Refactoring in commit v3.10.0-rc1~103^2~2 (FindMPI: Modernization from
ground up, 2017-04-25) accidentally left this variable set as a copy of
the `;`-list in `MPI_<LANG>_COMPILE_OPTIONS`, but the flags variable is
documented as a command-line string.  Restore it now.

Fixes: #18349
2018-09-10 14:33:29 -04:00
Kyle Edwards
09f0325eaf CTest: Fix regression in ctest_start()
The format for the TAG file was changed in 3.12, and the way it was
read caused a regression which changed how the track was decided. This
commit fixes the regression.

Fixes #18347.
2018-09-10 14:31:21 -04:00