Commit Graph

23606 Commits

Author SHA1 Message Date
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
Brad King 86edb6660b Merge topic 'simplify-env-var-determination'
5731f6d5 cm{Unset,Set}Command: use std::string to determine the env variable name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1350
2017-10-11 08:22:58 -04:00
Brad King 5d6ba8f2da Merge topic 'autogen-skip-ui'
e95429fd Autogen: Docs: Extend SKIP_AUTOUIC documentation
814cddbe Autogen: Docs: Add examples for AUTORCC_OPTIONS and AUTOUIC_OPTIONS
1c196268 Autogen: Allow setting SKIP_AUTOUIC/GEN on .ui files not in the sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1366
2017-10-11 08:17:57 -04:00
Brad King 401737f9ff Merge topic 'update-kwsys'
f1a4ecdc Merge branch 'upstream-KWSys' into update-kwsys
c551ff58 KWSys 2017-10-10 (239bc737)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1370
2017-10-11 08:15:24 -04:00
Kitware Robot 6e1fd9269c CMake Nightly Date Stamp 2017-10-11 00:01:06 -04:00
Matthias Maennich 5731f6d5b1 cm{Unset,Set}Command: use std::string to determine the env variable name 2017-10-10 13:28:39 -04:00
Brad King 8af7a16be7 Merge topic 'tryrun-strcpy'
a483b7ea TryRun: do not call strcpy()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1364
2017-10-10 09:10:54 -04:00
Brad King f1a4ecdc0c Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-10-10 (239bc737)
2017-10-10 08:43:41 -04:00
Kitware Robot c798dc8573 CMake Nightly Date Stamp 2017-10-10 00:01:03 -04:00
Sebastian Holtermann 1c19626864 Autogen: Allow setting SKIP_AUTOUIC/GEN on .ui files not in the sources
SKIP_AUTOUIC and SKIP_AUTOGEN were ignored when set on a `.ui` file that
was not in the sources of the target.
2017-10-09 14:35:17 +02:00
Matthias Maennich ff09abb8db cmLinkedTree: avoid unnecessary copies during Push of T 2017-10-09 10:23:14 +02:00
Kitware Robot cb8f26f199 CMake Nightly Date Stamp 2017-10-09 00:01:03 -04:00
Rolf Eike Beer a483b7eac2 TryRun: do not call strcpy() 2017-10-08 18:36:09 +02:00
Kitware Robot 4e96dc02c3 CMake Nightly Date Stamp 2017-10-08 00:01:03 -04:00
Kitware Robot 720c217ed5 CMake Nightly Date Stamp 2017-10-07 00:01:04 -04:00
Brad King 09a3a1cb9f Merge branch 'minor-fixes' into release-3.10
Merge-request: !1349
2017-10-06 07:18:01 -04:00
Brad King 7986103940 Merge topic 'minor-fixes'
b32b717b cmInstallCommandArguments: do not access static members through `this`
7eaa964e cmProcessTools: fix minor issue introduced by 595feb3
85a7eaba cmGeneratorTarget: remove dead code
3345e2a2 cmcmd: let operator<< for NumberFormatter reset the stream's format flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1349
2017-10-06 07:17:09 -04:00
Kitware Robot e1d6ede019 CMake Nightly Date Stamp 2017-10-06 00:01:04 -04:00