5004 Commits

Author SHA1 Message Date
Brad King
79e72f4b7c Merge topic 'FindMFC-try-static'
6b2bf575 FindMFC: Check for static MFC variant

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1034
2017-07-11 07:39:15 -04:00
Brad King
41be8a739e Merge topic 'autogen-no-generated-files'
9a34e95a Autogen: Skip generated files for compatibility with CMake 3.8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1033
2017-07-10 10:22:00 -04:00
Brad King
4bf96ed9b0 Merge topic 'find_package-restore-considered-configs'
e7730d78 find_package: Restore longer message when config files were considered

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1032
2017-07-10 10:21:23 -04:00
Brad King
e7730d78b4 find_package: Restore longer message when config files were considered
Since commit v3.9.0-rc1~58^2 (find_package: shorten output for missing
package in config mode, 2017-05-09) we print only the one line

    - Could NOT find Foo (missing: Foo_DIR)

when package Foo cannot be found in CONFIG mode and it is not REQUIRED.
However, in the case that package configuration files were found but not
used, this one line message leaves out important information.  This can
happen when a package configuration file sets `Foo_FOUND` to `FALSE` or
when its package version file does not match the requested version.
Restore the longer message in these cases.  Otherwise a seemingly valid
explicit `Foo_DIR` setting appears to be silently ignored even if it was
considered.

Fixes: #17029
2017-07-07 11:43:59 -04:00
Brad King
9a34e95a41 Autogen: Skip generated files for compatibility with CMake 3.8
The change in commit v3.9.0-rc1~464^2~8 (Autogen: Add AUTOMOC/UIC
support for generated source files, 2017-03-02) changes behavior of
existing projects that may not expect `AUTOGEN` on generated files and
do not yet set `SKIP_AUTOGEN` on them.  Disable the behavior change for
now to fix the regression for CMake 3.9.  We can restore it later with a
policy.

In order to keep the implementation and tests working, add an
undocumented property we can use in the tests to enable the behavior
before the policy is introduced.

Fixes: #17031
Issue: #16186
2017-07-07 10:12:15 -04:00
Rich Chiodo
6b2bf5756b FindMFC: Check for static MFC variant
Some CMake applications can set /MT without setting CMAKE_MFC_FLAG.
This change lets FindMFC work in those situations.
2017-07-06 11:28:20 -04:00
Sylvain Joubert
58f4744821 configure_file: Add support for indented cmakedefine
Optional spaces and/or tabs are now understood between the '#' character
and the 'cmakedefine'/'cmakedefine01' words. This indentation is
preserved in the output lines.

Fixes: #13037
2017-07-04 12:00:02 +02:00
Gregor Jasny
ff3498e76b XCTest: Speed up test by only enabling C language 2017-06-28 22:00:36 +02:00
Brad King
0552747b58 Merge topic 'feature/include_guard'
c96f43b7 include_guard: add tests for the feature
80f1221f include_guard: add doc pages and a release note
85b52a04 include_guard: add vim syntax highlighting rules
d44bd1c2 include_guard: implement new command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !928
2017-06-28 08:53:30 -04:00
Brad King
126effbb9c Merge topic 'vs_csharp_custom_command'
ec409a11 Vs: fix CSharp custom command by introducing inline MSBuild <Targets>s
dcdab5cf Vs: factor out computation of <Link> tag for CSharp source files
0a8f469a Vs: refactor WriteCustomRule for preparation of CSharp support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !970
2017-06-27 09:21:38 -04:00
Brad King
43c3afa745 Merge topic 'fix-crash-on-non-enabled-language-features'
e03a1b3b target_compile_features: Do not crash on non-enabled language
86990427 Tests: Enable languages explicitly in RunCMake.target_compile_features

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1010
2017-06-27 09:20:32 -04:00
Brad King
dc11a20d7b Merge topic 'vs-cuda-fix-flags'
bbc1f364 VS: Fix support for nvcc flags not in our flag table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1007
2017-06-27 09:18:34 -04:00
Brad King
fd771df773 Merge branch 'fix-crash-on-non-enabled-language-features' into release-3.9 2017-06-27 09:14:31 -04:00
Brad King
1d86103846 Merge branch 'vs-cuda-fix-flags' into release-3.9 2017-06-27 09:14:26 -04:00
Brad King
bbc1f3642c VS: Fix support for nvcc flags not in our flag table
The change in commit v3.9.0-rc4~3^2 (VS: Improve workaround for CUDA
-Xcompiler placement bug, 2017-06-21) accidentally appended to the
`AdditionalOptions` as if it were a `;`-separated list, but it is
actually a command-line string.  Append with a space instead.

While at it, fix the same problem for the `AdditionalOptions` added to
`CudaLink` by commit v3.9.0-rc3~1^2 (CUDA: When linking device code
suppress CUDA 8.0+ deprecation warnings, 2017-06-09).

Fixes: #17008
2017-06-27 09:08:50 -04:00
Brad King
e03a1b3b61 target_compile_features: Do not crash on non-enabled language
Fixes: #17011
2017-06-26 13:54:20 -04:00
Brad King
869904271b Tests: Enable languages explicitly in RunCMake.target_compile_features
Enable C or CXX (or nothing) as needed in each test case.
This will allow us to add test cases that do not enable CXX.
2017-06-26 13:54:20 -04:00
Michael Stürmer
ec409a116f Vs: fix CSharp custom command by introducing inline MSBuild <Targets>s
The custom command implementation is based on the Microsoft support article:

https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-extend-the-visual-studio-build-process

Fixes: #16960
2017-06-22 21:40:48 +02:00
Brad King
426c83cf8f Merge topic 'vs-rc-flags'
974f4333 VS: Fix support for rc /nologo flag in per-source COMPILE_FLAGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !998
2017-06-22 10:13:39 -04:00
Brad King
396b618c52 Merge topic 'vs-cuda-fix-flags'
3b754215 VS: Improve workaround for CUDA -Xcompiler placement bug
f2059585 VS: Fix target_compile_options for CUDA

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !996
2017-06-22 10:04:37 -04:00
Brad King
416e7919ec Merge topic 'cuda-macos-rpath-in-tests'
fff782f6 Tests: Simplify CUDA rpath on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !995
2017-06-22 10:03:02 -04:00
Brad King
a66f9bc0c4 Merge topic 'vs_fix_configuration_error'
0db4c7a0 Tests: Verify registry value is not "/registry" before using

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !994
2017-06-22 10:02:43 -04:00
Brad King
9f3bf3cb9d Merge topic 'vs_csharp_link_to_managed_cxx'
51865fc6 Vs: allow CSharp targets to be linked to CXX targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !993
2017-06-22 09:58:28 -04:00
Brad King
c8ee5dbc0c Merge branch 'vs-rc-flags' into release-3.9 2017-06-22 09:52:28 -04:00
Brad King
974f43338b VS: Fix support for rc /nologo flag in per-source COMPILE_FLAGS
Since commit v3.9.0-rc1~160^2 (VS: Use tool-specific flag table for
COMPILE_FLAGS parsing, 2017-05-03) we now correctly use the `rc` flag
table to process the COMPILE_FLAGS flags of `.rc` source files instead
of incorrectly using the `cl` flag table as before.  However, our `rc`
flag table is not complete.  The `/nologo` flag was working before only
by accident because the `cl` flag table entry for it happened to match.
Add the proper entry to the `rc` flag table.

Fixes: #16991
2017-06-22 09:45:42 -04:00
Pavel Solodovnikov
c96f43b7dd include_guard: add tests for the feature 2017-06-22 11:13:26 +03:00
Brad King
3d99244477 Merge branch 'vs-cuda-fix-flags' into release-3.9 2017-06-21 14:24:23 -04:00
Brad King
3b75421515 VS: Improve workaround for CUDA -Xcompiler placement bug
In commit v3.9.0-rc1~431^2~6 (VS: Place CUDA host compiler options in
proper project file fields, 2017-03-07) we worked around a bug in the
CUDA VS integration by dropping `AdditionalCompilerOptions`.  However,
this silently drops `-Xcompiler=` options given by the user that don't
map to one of CudaCompile's dedicated settings.  Improve the workaround
to instead put the remaining `AdditionalCompilerOptions` into the
`AdditionalOptions` field behind `-Xcompiler=` ourselves.
2017-06-21 14:24:11 -04:00
Brad King
f2059585e6 VS: Fix target_compile_options for CUDA
Fix the VS generator to honor `COMPILE_OPTIONS` for CUDA.  The exclusion
added by commit v3.9.0-rc1~431^2~7 (VS: Do not pass CUDA compile options
to C compiler, 2017-03-07) was correct but we need additional logic to
pass the CUDA compile options to the CUDA compiler.  Also we should
still pass the CXX or C options to MSVC (ClCompile) when those languages
are enabled even if the link language is CUDA.
2017-06-21 14:23:46 -04:00
Brad King
fff782f6a6 Tests: Simplify CUDA rpath on macOS
Use the `BUILD_RPATH` property and reference the CMake-computed location
of the runtime libraries.
2017-06-21 10:41:49 -04:00
Michael Stürmer
0db4c7a021 Tests: Verify registry value is not "/registry" before using
Fixes: #17002
2017-06-21 08:49:42 -04:00
Michael Stürmer
51865fc67e Vs: allow CSharp targets to be linked to CXX targets
Fixes: #16755
2017-06-21 08:37:15 +02:00
Sebastian Holtermann
50b3837c64 Autogen: Q_OBJECT behind brace test 2017-06-20 10:49:00 +02:00
Brad King
7c5299add4 Merge topic 'doc-test-layout'
1c547152 Tests: Document test directory layout in a README.rst
4e3483c0 Help/dev: Update source code guide to cover source tree layout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !967
2017-06-15 10:23:38 -04:00
Brad King
f3ffd18ab6 Merge topic 'vs_csharp_prop_for_all_extensions'
c90630c5 Vs: add support for VS_CSHARP_* target property for additional file extensions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !961
2017-06-15 10:22:12 -04:00
Brad King
d3b981ab3e Merge topic 'ipo-per-lang'
ba247cca IPO: Consider support for each language separately

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !964
2017-06-15 10:05:02 -04:00
Brad King
1c5471527e Tests: Document test directory layout in a README.rst
Cross-reference the CMake Source Code Guide document.
Also drop the outdated `Tests/README` file.
2017-06-14 15:04:19 -04:00
Brad King
c8b4da5838 Merge topic 'vs-dotnet-custom-reference-tags'
07ec212a VS: add target property VS_DOTNET_REFERENCEPROP_<refname>_TAG_<tagname>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !960
2017-06-14 12:43:34 -04:00
Brad King
ba247ccaba IPO: Consider support for each language separately
We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and
Fortran languages.  Do not try to enable support for other languages.
Furthermore, each language builds with a different compiler, so check
for support by CMake and the compiler for each language independently.

Fixes: #16944
2017-06-14 10:36:57 -04:00
Sebastian Holtermann
7f68ad6612 Autogen: Tests: Disable some tests on non ASCII build paths 2017-06-13 16:51:33 +02:00
Michael Stürmer
07ec212ae8 VS: add target property VS_DOTNET_REFERENCEPROP_<refname>_TAG_<tagname>
Fixes: #16689
2017-06-13 10:46:31 -04:00
Michael Stürmer
c90630c501 Vs: add support for VS_CSHARP_* target property for additional file extensions
Fixes: #16726
2017-06-13 16:04:22 +02:00
Sebastian Holtermann
38e3fc4bdd Autogen: Tests fix for utf8 paths 2017-06-12 21:54:45 +02:00
Brad King
00b91b1530 Merge topic 'execute_process-pipeline-results'
d6051ca3 execute_process: Add option to get results of every child

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !702
2017-06-12 10:22:12 -04:00
Brad King
99153a9eb6 Merge topic 'cuda-compiler-launcher'
414438b2 CUDA: Add option to run the compiler through launcher tools

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !949
2017-06-12 10:20:58 -04:00
Adam Weisi
d6051ca39e execute_process: Add option to get results of every child
Add a `RESULTS_VARIABLE` option to get the results of all children
in a pipeline of one or more `COMMAND`s.
2017-06-10 08:03:06 -04:00
Brad King
414438b2fb CUDA: Add option to run the compiler through launcher tools
Add a `CUDA_COMPILER_LAUNCHER` target property like those added for C
and CXX by commit v3.4.0-rc1~450^2 (Add options to launch the compiler
through tools like ccache or distcc, 2015-06-04).

Fixes: #16953
2017-06-09 12:34:39 -04:00
Brad King
82be694c7a file(GENERATE): Add policy CMP0070 to define relative path behavior
Previously `file(GENERATE)` did not define any behavior for relative
paths given to the `OUTPUT` or `INPUT` arguments.  Define behavior
consistent with CMake conventions and add a policy to provide
compatibility for projects that relied on the old accidental behavior.

Fixes: #16786
2017-06-09 10:38:43 -04:00
Brad King
69050f4d16 Tests: Use full output paths in file(GENERATE) calls
We don't define behavior for relative paths to the OUTPUT argument.
Fix our tests to use full paths.
2017-06-08 13:31:33 -04:00
Florian Maushart
e7869e80ce cmake_host_system_information: Add more keywords
Extend the `cmake_host_system_information()` command to add processor
identification keywords.
2017-06-05 13:51:30 -04:00