Commit Graph

25088 Commits

Author SHA1 Message Date
Brad King
a9df54ec31 Merge topic 'symlink'
afb7f6e4ff cmake: Add '-E create_symlink' support on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2144
2018-09-19 10:41:07 -04:00
Brad King
ec9ef691fe Merge topic 'provide_explicit_source_and_build_command_line_options'
638f00117a Add release note for the -S and -B options.
de962cc00d CMake: Internally uses -S instead of -H to specify source directory
a10d63d578 cmake: -S and -B can be used to specify source and build directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2358
2018-09-19 10:38:19 -04:00
Brad King
c0cedaa643 Merge topic 'ctest-more_submit_params'
7f530cc54e ctest_submit: pass additional info to CDash

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2380
2018-09-19 10:36:11 -04:00
Brad King
76a19eb6c1 Merge topic 'fix-getsafedef-stdstring'
2428422c02 Fix regression in target output file naming logic
d686f81e58 Restore possibly regressed CMP0018 logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2402
2018-09-19 10:33:01 -04:00
Brad King
2428422c02 Fix regression in target output file naming logic
Refactoring in commit f4ff60a803 (cmMakefile: Make GetSafeDefinition
return std::string const&, 2018-09-05) accidentally changed the logic
for target artifact prefix and suffix names such that setting a PREFIX
or SUFFIX target property would cause an empty value to be used.  Revert
that part of the change and use a simpler alternative.  Add a test case.

Reported-by: Alan W. Irwin <irwin@beluga.phys.uvic.ca>
2018-09-19 08:14:48 -04:00
Brad King
d686f81e58 Restore possibly regressed CMP0018 logic
Refactoring in commit f4ff60a803 (cmMakefile: Make GetSafeDefinition
return std::string const&, 2018-09-05) changed the treatment of the
empty string in CMP0018 diagnostic logic.  Restore the behavior.
2018-09-19 07:42:08 -04:00
Kitware Robot
3ada513413 CMake Nightly Date Stamp 2018-09-19 00:01:07 -04:00
Jon Chronopoulos
afb7f6e4ff cmake: Add '-E create_symlink' support on Windows
The allows `-E create_symlink` to work on Windows.  It utilizes
`uv_fs_symlink`.  I am still unsure exactly which Windows platforms will
work without requiring Administrator privileges or needing a user/group
with the "Create Symbolic Links" User Rights.  It does work with my
Windows 10 Pro with Developer Mode turned on.  In the test suite check
that the symlink either worked or failed with a permissions error.

Use recent changes in cmSystemTools::FileExists to check that a symlink
is broken.
2018-09-18 11:24:08 -04:00
Brad King
7162630bee Merge topic 'vs-ipo'
bef80e6623 VS: Do not specify incremental linking if LTCG is enabled
567fabe88e IPO: INTERPROCEDURAL_OPTIMIZATION (LTCG) for Visual Studio

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2363
2018-09-18 11:22:41 -04:00
Brad King
fc74fcc853 Merge topic 'link-options'
53ad52d66d LINK_OPTIONS: Add missing initialization actions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2395
2018-09-18 11:18:57 -04:00
Brad King
a8f628c0a4 Merge topic 'getsafedef-stdstring'
f4ff60a803 cmMakefile: Make GetSafeDefinition return std::string const&

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2350
2018-09-18 11:18:00 -04:00
Vitaly Stakhovsky
f4ff60a803 cmMakefile: Make GetSafeDefinition return std::string const& 2018-09-18 11:16:46 -04:00
Kitware Robot
6097d8dd3d CMake Nightly Date Stamp 2018-09-18 00:01:09 -04:00
Brad King
bef80e6623 VS: Do not specify incremental linking if LTCG is enabled
Otherwise the linker may warn:

    LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
2018-09-17 10:53:27 -04:00
Niels Dekker
567fabe88e IPO: INTERPROCEDURAL_OPTIMIZATION (LTCG) for Visual Studio
Add IPO support for Visual Studio (which is referred to by VS as
"Link Time Code Generation" and "Whole Program Optimization"), for
VS version >= 10.  This allows CMake/VS users to enable IPO by setting
property `INTERPROCEDURAL_OPTIMIZATION`.

Fixes: #16748
2018-09-17 10:53:10 -04:00
Marc Chevrier
53ad52d66d LINK_OPTIONS: Add missing initialization actions 2018-09-17 16:42:37 +02:00
Zack Galbreath
7f530cc54e ctest_submit: pass additional info to CDash
Specify buildname, site, and buildstamp to CDash upon submission.
CDash will use this extra info to assign and report back a buildid.
2018-09-17 10:38:33 -04:00
Brad King
2af106a43a Merge topic 'link-options'
6da8b67c3f target_link_options: fix erroneous handling of BEFORE keyword.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2384
2018-09-17 09:25:40 -04:00
Brad King
b3f1e65486 Merge topic 'update-kwsys'
49e7a82c90 Merge branch 'upstream-KWSys' into update-kwsys
b13c8526b1 KWSys 2018-09-14 (1809bedd)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2385
2018-09-17 09:22:38 -04:00
Kitware Robot
19daeda516 CMake Nightly Date Stamp 2018-09-17 00:01:10 -04:00
Kitware Robot
e173c25f19 CMake Nightly Date Stamp 2018-09-16 00:01:06 -04:00
Robert Maynard
de962cc00d CMake: Internally uses -S instead of -H to specify source directory 2018-09-15 11:25:47 -04:00
Robert Maynard
a10d63d578 cmake: -S and -B can be used to specify source and build directories
Document the previously internal option of '-B' and provide a
matching source directory option with '-S'. Both '-B', and '-S'
can be used independently of each other.
2018-09-15 11:25:47 -04:00
Kitware Robot
18eb4c637a CMake Nightly Date Stamp 2018-09-15 00:01:15 -04:00
Brad King
49e7a82c90 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-09-14 (1809bedd)
2018-09-14 13:25:53 -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
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
Marc Chevrier
6da8b67c3f target_link_options: fix erroneous handling of BEFORE keyword. 2018-09-14 18:10:58 +02: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
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
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
Kitware Robot
f53bd80de1 CMake Nightly Date Stamp 2018-09-12 00:01:08 -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
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
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
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
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
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