Commit Graph

23623 Commits

Author SHA1 Message Date
Deniz Bahadir
fe4b25ec2f Teach target_* commands to set INTERFACE properties of IMPORTED targets
Now, several `INTERFACE_*` properties can be set on `IMPORTED` targets,
not only via `set_property` and `set_target_properties` but also via
`target_compile_definitions`, `target_compile_features`,
`target_compile_options`, `target_include_directories`, `target_sources`
and `target_link_libraries`.

Fixes: #15689
Issue: #17197
2017-10-26 09:11:04 -04:00
Deniz Bahadir
e40fd9fd19 cmTargetPropCommandBase: Fix typo in error message 2017-10-26 09:11:00 -04:00
Brad King
cec4b86f0a Merge topic 'server-codemodel-install-dest'
296eb9ad cmake-server: Add target install destinations to codemodel

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1382
2017-10-25 08:17:03 -04:00
Brad King
e419a67a56 Merge topic 'windows_symlinks'
393e0fbe cmTimestamp: For symlinks switch to timestamp of resolved path
640709e7 cmSystemTools: Implement GetRealPath on Windows
d41582fc Call GetRealPath through cmSystemTools instead of KWSys directly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1202
2017-10-25 08:14:55 -04:00
Brad King
b5dd256d94 Merge topic 'defer-target-source-check'
4e7f6738 Defer check for sources within a target until generation.
6e4e7c65 Tests: Exclude bad RunCMake.add_executable case on multi-arch Xcode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1242
2017-10-25 08:11:19 -04:00
Kitware Robot
53d8be4118 CMake Nightly Date Stamp 2017-10-25 00:01:14 -04:00
Justin Goshi
296eb9ad4c cmake-server: Add target install destinations to codemodel
Protocol version is updated to 1.2 since this is a change
to what was released in cmake version 3.10.
2017-10-24 14:58:07 -04:00
Manuel Núñez
393e0fbe63 cmTimestamp: For symlinks switch to timestamp of resolved path
ModifiedTime uses stat on UNIX which does resolve symlinks, however Windows implementation relies on GetFileAttributesExW which does not. Getting real file path before calling ModifiedTime will not change UNIX semantic and will fix Windows behavior.

Fixes: #17206
2017-10-24 11:04:25 -04:00
Manuel Núñez
640709e7db cmSystemTools: Implement GetRealPath on Windows
Override the KWSys GetRealPath on Windows and use uv_fs_realpath first
to resolve symbolic links.

Fixes: #17206
2017-10-24 11:04:23 -04:00
Manuel Núñez
d41582fc94 Call GetRealPath through cmSystemTools instead of KWSys directly
This will allow a wrapper to be added to extend functionality.
2017-10-24 11:04:21 -04:00
Brad King
11dcf81c44 Merge topic 'generator-instance'
9ffb3538 VS: Select and save a VS 2017 instance persistently
17edfa41 cmVSSetupHelper: Add option to specify an instance
a19b8113 CheckLanguage: Pass generator instance into check
6b3cd64d ExternalProject: Propagate the generator instance
314613d1 Add infrastructure for generators to select a build tool instance

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1394
2017-10-24 08:22:25 -04:00
Deniz Bahadir
4e7f67383f Defer check for sources within a target until generation.
The `add_library` and `add_executable` commands can now be called with
no source-files and won't generate a warning or error message, as long
as source-files will be added later via the `target_sources` command.
If during the generation step still no sources are associated with
targets created by such calls a useful error message will be generated
and generation fails.

Targets of type `INTERFACE_LIBRARY`, `UTILITY` or `GLOBAL_TARGET` are
excluded from this check because we do not need sources for these target
types during generation.

Fixes: #16872
2017-10-24 08:14:47 -04:00
Kitware Robot
48c713d324 CMake Nightly Date Stamp 2017-10-24 00:01:07 -04:00
Kitware Robot
685d69ad29 CMake Nightly Date Stamp 2017-10-23 00:01:03 -04:00
Kitware Robot
6b0328f24b CMake Nightly Date Stamp 2017-10-22 00:01:08 -04:00
Kitware Robot
3e0441d877 CMake Nightly Date Stamp 2017-10-21 00:01:04 -04:00
Kitware Robot
fa501bc826 CMake Nightly Date Stamp 2017-10-20 00:01:09 -04:00
Brad King
9ffb35386f VS: Select and save a VS 2017 instance persistently
Visual Studio 2017 supports multiple instances installed on a single
machine.  We use the Visual Studio Installer tool to enumerate instances
and select one.  Once we select an instance for a given build tree, save
the result in `CMAKE_GENERATOR_INSTANCE` so we can re-configure the tree
with the same instance on future re-runs of CMake.

Fixes: #17268
2017-10-19 10:20:12 -04:00
Brad King
17edfa4198 cmVSSetupHelper: Add option to specify an instance 2017-10-19 10:20:12 -04:00
Brad King
314613d1af Add infrastructure for generators to select a build tool instance
Add cache entry `CMAKE_GENERATOR_INSTANCE` to hold the instance location
persistently across re-runs of CMake in a given build tree.

For now we reject the option by default if explicitly set.  It will be
implemented on a per-generator basis.  Pass the setting into try_compile
project generation.  Add a RunCMake.GeneratorInstance test to cover
basic use cases for the option.  Verify that `CMAKE_GENERATOR_INSTANCE`
is empty by default, and that it is rejected when the generator does not
support a user setting.

Issue: #17268
2017-10-19 10:20:08 -04:00
Brad King
358ceee5d8 Merge topic 'curl_netrc_options'
d45aa38a Add dev notes for topic 'curl_netrc_options'
60c272b6 ExternalProject: Add support for NETRC and NETRC_FILE suboption
754e39dd Add testcases for file(DOWNLOAD|UPLOAD) netrc options
5d67e902 file(DOWNLOAD|UPLOAD): Add 'NETRC' and 'NETRC_FILE' suboption

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge-request: !1376
2017-10-19 09:27:43 -04:00
Brad King
ec0dbd044a Merge topic 'ide-direct-CMakeLists.txt'
344d149a VS,Xcode: Add CMakeLists.txt sources without mutating targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1392
2017-10-19 09:26:33 -04:00
Kitware Robot
c412f40b5a CMake Nightly Date Stamp 2017-10-19 00:01:36 -04:00
Shane Parris
5d67e9025d file(DOWNLOAD|UPLOAD): Add 'NETRC' and 'NETRC_FILE' suboption 2017-10-18 15:21:42 -04:00
Brad King
344d149ae4 VS,Xcode: Add CMakeLists.txt sources without mutating targets
Rather than injecting `CMakeLists.txt` files into each target's
`SOURCES`, teach the generators to add them during generation using
dedicated code.  This avoids mutating the original targets, and avoids
polluting `$<TARGET_PROPERTY:foo,SOURCES>` with generator-specific
content.

This also avoids listing the `CMakeLists.txt` sources in the results of
`CMAKE_DEBUG_TARGET_PROPERTIES==SOURCES` so the `RunCMake.TargetSources`
test no longer needs a separate case for IDEs.
2017-10-18 14:24:07 -04:00
Brad King
b0b94cdec5 Merge topic 'cmake-open'
96d642c7 cmake-gui: Use cmake::Open to open generated project
5de37a4a cmake: Add --open option for IDE generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge-request: !1337
2017-10-18 09:37:59 -04:00
Brad King
0f23697eb0 Merge topic 'vs-cuda-machine'
fd90a14f VS: Set CUDA TargetMachinePlatform explicitly on x64

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1390
2017-10-18 09:36:06 -04:00
Kitware Robot
7a67f5c599 CMake Nightly Date Stamp 2017-10-18 00:01:05 -04:00
Brad King
fd90a14f1b VS: Set CUDA TargetMachinePlatform explicitly on x64
The `TargetMachinePlatform` setting tells CUDA what `--machine {32,64}`
flag to pass to nvcc.  While CUDA automatically chooses the proper
default for the target architecture, it does not reflect this in the
user-visible IDE settings.  Set it explicitly to fix the user-visible
setting.

Fixes: #17355
2017-10-17 10:41:41 -04:00
Brad King
d0fbf3d4cb Merge topic 'vs-2017-cl-check'
f566586e VS: Detect compiler component in VS 2017 instances more reliably
c6bb704e cmVSSetupHelper: Fix install location encoding conversion
4c3116d7 cmVSSetupHelper: Factor out install location string construction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1388
2017-10-17 08:35:50 -04:00
Kitware Robot
01c836c951 CMake Nightly Date Stamp 2017-10-17 00:01:04 -04:00
Brad King
f566586e1c VS: Detect compiler component in VS 2017 instances more reliably
The `Microsoft.VisualStudio.Component.VC.Tools.x86.x64` component is
not the only way a VS instance may provide the `cl` compiler tool.
For example, VS 2017 Express Edition does not install that component.
Instead search for the tools directly on disk within an instance.

Suggested-by: Rich Chiodo <rchiodo@microsoft.com>
Fixes: #17349
2017-10-16 11:57:15 -04:00
Brad King
c6bb704ea1 cmVSSetupHelper: Fix install location encoding conversion 2017-10-16 11:55:53 -04:00
Brad King
4c3116d754 cmVSSetupHelper: Factor out install location string construction
This also adds a missing conversion to unix slashes in one code path.
2017-10-16 11:55:53 -04:00
Brad King
60f982aab4 Merge topic 'imported-interface-no-system'
22beb07f Help: Clarify documentation of NO_SYSTEM_FROM_IMPORTED
2de0e0fd Do not initialize NO_SYSTEM_FROM_IMPORTED on INTERFACE libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1386
2017-10-16 09:51:46 -04:00
Brad King
9de7ae6e5e Merge topic 'cpack-wix-cygwin'
e1409101 cpack wix: support WiX generator on Cygwin
e258fe03 cpack wix: fix path error on cygwin

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1367
2017-10-16 09:48:02 -04:00
Brad King
42461a2a01 Merge topic 'cpack-dmg-errors'
1943dc6b cmCPackDragNDropGenerator: Improve error reporting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1379
2017-10-16 09:47:34 -04:00
Brad King
9c3bdbd584 Merge topic 'update-kwsys'
df92617b Merge branch 'upstream-KWSys' into update-kwsys
e44b0cb2 KWSys 2017-10-12 (ef0ad34d)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1384
2017-10-16 09:46:23 -04:00
Kitware Robot
386f7c6e98 CMake Nightly Date Stamp 2017-10-16 00:01:05 -04:00
Kitware Robot
7b26768dfa CMake Nightly Date Stamp 2017-10-15 00:01:03 -04:00
Kitware Robot
9628f0c001 CMake Nightly Date Stamp 2017-10-14 00:01:05 -04:00
Gregor Jasny
96d642c7b8 cmake-gui: Use cmake::Open to open generated project 2017-10-13 21:28:35 +02:00
Gregor Jasny
5de37a4a64 cmake: Add --open option for IDE generators 2017-10-13 21:28:34 +02:00
Brad King
2de0e0fdfa Do not initialize NO_SYSTEM_FROM_IMPORTED on INTERFACE libraries
The change in commit v3.8.0-rc1~276^2 (Allow NO_SYSTEM_FROM_IMPORTED on
imported INTERFACE libraries, 2016-11-21) was incorrect.  The property
is not meant to be set on imported targets at all.  It is meant to be
set on their consumers that compile sources.  Since INTERFACE libraries
have no sources to compile, the property is not needed on them.

Revert most of that change.  Unfortunately we must still tolerate
project code setting NO_SYSTEM_FROM_IMPORTED on INTERFACE libraries
because they were allowed by CMake 3.8 and 3.9.

Issue: #17348
2017-10-13 14:32:14 -04:00
Stephen Sorley
e1409101c9 cpack wix: support WiX generator on Cygwin
Cygwin-built CMake now converts paths from Cygwin to Windows form
(using cygpath -w) before they're passed to WiX.

The Wix generator on Cygwin requires the libuuid-dev package when
building CMake. However, the DLL it links to is installed by default
as part of Cygwin's core libs, so it does not need to be distributed.

If libuuid-dev isn't available, CMake is simply built without Wix
support on Cygwin.
2017-10-13 13:07:37 -04:00
Brad King
df92617b73 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-10-12 (ef0ad34d)
2017-10-13 09:14:04 -04:00
Kitware Robot
18eec11539 CMake Nightly Date Stamp 2017-10-13 00:01:06 -04:00
Kitware Robot
add1ba92f7 CMake Nightly Date Stamp 2017-10-12 00:01:05 -04:00
Clinton Stimpson
1943dc6bd5 cmCPackDragNDropGenerator: Improve error reporting
When running hdiutil and other commands, capture errors and log them.
2017-10-11 20:40:59 -06:00
Brad King
5fd0ce61f7 Merge topic 'linked-tree'
ff09abb8 cmLinkedTree: avoid unnecessary copies during Push of T

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1351
2017-10-11 08:24:23 -04:00