Commit Graph

24621 Commits

Author SHA1 Message Date
Kitware Robot
2d480a1c14 CMake Nightly Date Stamp 2018-05-24 00:01:04 -04:00
Kitware Robot
0e6bc9d025 CMake Nightly Date Stamp 2018-05-23 00:01:05 -04:00
Kitware Robot
e6a32f0525 CMake Nightly Date Stamp 2018-05-22 00:01:11 -04:00
Brad King
90e7103fc6 Merge topic 'pr.copy_data_check'
a203fcc63d cmake: Teach '-E tar' to report errors copying data

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2075
2018-05-21 11:05:42 -04:00
Brad King
64ec064212 Merge topic 'eclipse-custom-content'
fd0da95f63 Eclipse: Add property to include additional contents in .cproject file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2088
2018-05-21 11:04:04 -04:00
Brad King
7b42ffce09 Merge topic 'PDBDirectoryGenExpression'
79ca546ed2 Add generator expression support to PDB_OUTPUT_DIRECTORY target property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2083
2018-05-21 11:02:42 -04:00
Marian Klymov
79ca546ed2 Add generator expression support to PDB_OUTPUT_DIRECTORY target property
Fixes: #16365
2018-05-21 11:00:12 -04:00
Brad King
963a33f4a8 Merge topic 'vs-remove-stream'
790fc415b1 cmVisualStudio10TargetGenerator: remove BuildFileStream member

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2082
2018-05-21 10:58:53 -04:00
Brad King
4d6f4500df Merge topic 'update-kwsys'
b730097788 Merge branch 'upstream-KWSys' into update-kwsys
1f52cb087a KWSys 2018-05-18 (5357cfc4)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2090
2018-05-21 09:52:08 -04:00
Kitware Robot
e5463ec917 CMake Nightly Date Stamp 2018-05-21 00:01:05 -04:00
Kitware Robot
32cf27ada5 CMake Nightly Date Stamp 2018-05-20 00:01:08 -04:00
Kitware Robot
76affcb6b4 CMake Nightly Date Stamp 2018-05-19 00:01:07 -04:00
Melanie Cappelaere
fd0da95f63 Eclipse: Add property to include additional contents in .cproject file
Similar to ECLIPSE_EXTRA_NATURES which can be used to add a third party
nature to the .project, this property offers the possibility to inject
third party contents into the .cproject.

An example of where this is useful is MCUXpresso. This is an IDE based
on Eclipse. Compiling through CMake generated Eclipse projects works
fine by using a custom toolchain. However, in order to be able to debug
using such a project, an extra storageModule specific to the target
board is needed in the cproject.
2018-05-18 10:12:19 -04:00
Ruslan Baratov
a203fcc63d cmake: Teach '-E tar' to report errors copying data
The `copy_data` function checks for errors but the caller ignored
them.  Simplify its return type and add a check to the caller.
2018-05-18 10:04:18 -04:00
Brad King
b730097788 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-05-18 (5357cfc4)
2018-05-18 09:52:13 -04:00
Kitware Robot
4eea43fce7 CMake Nightly Date Stamp 2018-05-18 00:01:05 -04:00
Brad King
b6ce5aef0f Merge topic 'makefile-ar-limits'
b6c49713b3 Makefile: Fix command line limits for static libs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2078
2018-05-17 09:06:56 -04:00
Brad King
4ba7db4ff3 Merge topic 'pr.file_write_check'
2db4945150 file(WRITE): Report errors during write operation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2076
2018-05-17 09:06:22 -04:00
Brad King
10a6c5a842 Merge topic 'update-kwsys'
3333e2791b Help: Add release note about 'copy_directory' behavior change
24367563d7 Merge branch 'upstream-KWSys' into update-kwsys
1e0a2e9377 KWSys 2018-05-15 (5f757898)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2080
2018-05-17 09:05:09 -04:00
Kitware Robot
e81e024330 CMake Nightly Date Stamp 2018-05-17 00:01:06 -04:00
Vitaly Stakhovsky
790fc415b1 cmVisualStudio10TargetGenerator: remove BuildFileStream member
Stream object is now local to `Generate()`
2018-05-16 12:59:00 -04:00
Viktor Mukha
b6c49713b3 Makefile: Fix command line limits for static libs
I have been hitting the Windows command-line limit when cross-compiling
static library (POCO) and having more than 8000 characters in the call
to "ar". Calculating exact limits here are tricky, since this particular
limit will only take into account object file strings, which is correct
for response files, but not for the archive rules (link.txt files),
since they also contain the call to "ar" and its arguments.
Also, there can be other additional arguments if "ar" tool is wrapped
into something else, so it is a good idea to leave more space than
trying to exactly fit the limit.
Since response files use half of the limit as a heuristic, we reproduce
it here for consistency.
2018-05-16 12:48:20 -04:00
Ruslan Baratov
2db4945150 file(WRITE): Report errors during write operation
We already report an error if the file cannot be opened for writing.
Add another check to report an error if a write operation itself fails.
2018-05-16 10:34:28 -04:00
Brad King
cd5d6dfada Merge topic 'subdirectory-linking'
c9349cc1b9 target_link_libraries: Allow use with targets in other directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2040
2018-05-16 10:03:39 -04:00
Brad King
c8c07c24dd Merge topic 'dotnet_target_fw_init'
71a033616a added CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2032
2018-05-16 10:02:48 -04:00
Brad King
d32ceffb1e Merge topic 'vs-nitpicks'
b88e138369 cmVisualStudio10TargetGenerator: minor code cleanup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2063
2018-05-16 10:01:57 -04:00
Brad King
24367563d7 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-05-15 (5f757898)

Fixes: #16001
2018-05-16 09:54:08 -04:00
Kitware Robot
c698dbd45d CMake Nightly Date Stamp 2018-05-16 00:01:05 -04:00
Patrick Stotko
c9349cc1b9 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.

Fixes: #17943
2018-05-15 10:22:35 -04:00
Brad King
eaf8d7a1f4 Merge topic 'autogen_register_info_files'
e461a136c1 Autogen: Register generated dependency files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2071
2018-05-15 09:58:55 -04:00
Brad King
c29992078f Merge topic 'custom-command-expand-empty'
6e59491659 add_custom_{command,target}: Fix crash on empty expanded command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2074
2018-05-15 09:54:08 -04:00
Michael Stürmer
71a033616a added CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION variable
Fixes: #17955
2018-05-15 09:00:31 +02:00
Kitware Robot
d793b482d9 CMake Nightly Date Stamp 2018-05-15 00:01:05 -04:00
Brad King
6e59491659 add_custom_{command,target}: Fix crash on empty expanded command
Our custom command generation logic assumes that all command lines have
at least `argv0`.  In `add_custom_{command,target}` we already check
that at least a `COMMAND` was given, but using `COMMAND_EXPAND_LISTS` in
combination with a generator expression that expands to an empty string
may produce an empty command line.  In this case simply add an empty
string as a command to maintain our internal invariant.

Fixes: #17993
2018-05-14 11:54:27 -04:00
Brad King
5a227ce805 Merge topic 'cuda-vs-cuda-device-runtime'
a170a59a58 VS: Link CUDA binaries with the device runtime library 'cudadevrt'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2062
2018-05-14 09:42:00 -04:00
Brad King
81ef418fe8 Merge topic 'update-kwsys'
05d67d2545 Merge branch 'upstream-KWSys' into update-kwsys
55efd14733 KWSys 2018-05-11 (46da6b14)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2064
2018-05-14 09:35:00 -04:00
Brad King
18c71919ac Merge topic 'xml-element-enhance'
ff13b0cdc2 cmCTestLaunch: use cmXMLElement for XML generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2057
2018-05-14 09:34:19 -04:00
Brad King
a04ca510c1 Merge topic 'cpack-nuget'
f739752ad6 CPack: Add NuGet support
dd43e6fe89 Tests: Format `RunCPackVerifyResult.cmake` more consistently
43582cda57 Tests: Fix comment for finding dpkg tool

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1972
2018-05-14 09:32:04 -04:00
Sebastian Holtermann
e461a136c1 Autogen: Register generated dependency files
For CMP0058 record that rcc info files are generated by CMake.

Fixes: #17985
2018-05-14 09:21:14 -04:00
Kitware Robot
653eb6ebdc CMake Nightly Date Stamp 2018-05-14 00:01:03 -04:00
Kitware Robot
9388d13f60 CMake Nightly Date Stamp 2018-05-13 00:01:04 -04:00
Kitware Robot
9afeb2e5a7 CMake Nightly Date Stamp 2018-05-12 00:01:12 -04:00
Brad King
05d67d2545 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-05-11 (46da6b14)
2018-05-11 11:34:27 -04:00
Vitaly Stakhovsky
ff13b0cdc2 cmCTestLaunch: use cmXMLElement for XML generation
class `cmXMLElement` enhanced with more members; its use demonstrated
2018-05-11 11:33:13 -04:00
Vitaly Stakhovsky
b88e138369 cmVisualStudio10TargetGenerator: minor code cleanup 2018-05-11 10:05:51 -04:00
Alex Turbov
f739752ad6 CPack: Add NuGet support
Create a CPack generator that uses `nuget.exe` to create packages:

    https://docs.microsoft.com/en-us/nuget/what-is-nuget

NuGet packages could be easily produced from a `*.nuspec` file (running
`nuget pack` in the directory w/ the spec file).  The spec filename does
not affect the result `*.nupkg` name -- only `id` and `version` elements
of the spec are used (by NuGet).

Some implementation details:

* Minimize C++ code -- use CMake script do to the job. It just let the
  base class (`cmCPackGenerator`) to preinstall everything to a temp
  directory, render the spec file and run `nuget pack` in it, harvesting
  `*.nupkg` files...;

* Ignore package name (and use default paths) prepared by the base class
  (only `CPACK_TEMPORARY_DIRECTORY` is important) -- final package
  filename is a responsibility of NuGet, so after generation just scan the
  temp directory for the result `*.nupkg` file(s) and update
  `packageFileNames` data-member of the generator;

* The generator supports _all-in-one_ (default), _one-group-per-package_
  and _one-component-per-package_ modes.
2018-05-11 09:28:44 -04:00
Brad King
c9e995c9ef Merge topic 'vs-refactor'
a2b5acec3b cmVisualStudio10TargetGenerator: refactor

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2054
2018-05-11 09:23:13 -04:00
Brad King
1dda570edc Merge topic 'vs-fix-csharp-recompile'
91754b4e60 VS: When not referencing output assembly do not try to copy it either

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2037
2018-05-11 09:20:49 -04:00
Brad King
1e521a1a91 Merge topic 'restore-imported-lib-alias-diagnostic'
e567d7eb63 add_library: Restore error on alias of non-global imported target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2058
2018-05-11 09:18:08 -04:00
Brad King
a170a59a58 VS: Link CUDA binaries with the device runtime library 'cudadevrt'
According to https://docs.nvidia.com/cuda/nvrtc/index.html there are
some cases where a CUDA binary "...must be linked against the CUDA
device runtime (cudadevrt) library".  When `nvcc` drives linking it
automatically links to runtime libraries as follows:

* -cudart=none: None
* -cudart=shared: -lcudadevrt -lcudart
* -cudart=static: -lcudadevrt -lcudart_static

The `cudadevrt` library is the cuda device runtime library.  It is
always static so passing it to the linker when not necessary does
not hurt anything.

With Ninja and Makefile generators, we detect `cudadevrt` and either
`cudart` or `cudart_static` libraries implied by `nvcc` and then add
them to link lines driven by a host compiler.  However, this does not
work with the VS generator because the CUDA Toolkit Visual Studio
integration does not use `nvcc` to link binaries and instead uses
`link.exe` directly.

Visual Studio project files (`.vcxproj`) for CUDA are expected to
explicitly list the needed runtime libraries.  Our VS generator already
adds `cudart.lib` or `cudart_static.lib` based on the `-cudart=` flag.
Update it to also add `cudadevrt.lib` as nvcc does.

Fixes: #17988
2018-05-11 08:49:10 -04:00