Commit Graph

23983 Commits

Author SHA1 Message Date
Brad King
c2f79c9867 Genex: Enable COMPILE_LANGUAGE for COMPILE_DEFINITIONS with VS and Xcode
The set of compile flags used for a target's C and C++ sources is based
on the linker language.  By default this is always the C++ flags if any
C++ sources appear in the target, and otherwise the C flags.  Therefore
we can define the `COMPILE_LANGUAGE` generator expression in
`COMPILE_DEFINITIONS` to match the selected language.

This is not exactly the same as for other generators, but is the best VS
and Xcode can do.  It is also sufficient for many use cases since the
set of definitions for C and C++ is frequently similar but may be
distinct from those for other languages like CUDA.

Issue: #17435
2018-01-12 14:27:37 -05:00
Brad King
0795d25b78 cmVisualStudio10TargetGenerator: Factor out include dir computation 2018-01-11 15:03:02 -05:00
Brad King
1ab4d186a7 cmLocalVisualStudio7Generator: Clarify variable name of compiled language 2018-01-11 10:55:20 -05:00
Brad King
07e1a74361 cmLocalVisualStudio7Generator: Clarify condition for target that compiles 2018-01-11 10:54:06 -05:00
Brad King
8c450b316f Merge topic 'autogen-nexist-source-fix'
be304fb8 Merge branch 'backport-autogen-nexist-source-fix' into autogen-nexist-source-fix
d592bfc9 Autogen: Ignore not existing source files in cmMakefile
513eb014 Autogen: Ignore not existing source files in cmMakefile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1651
2018-01-11 10:29:58 -05:00
Brad King
2d5fdc25df Merge topic 'specify-source-extensions'
efd279cd cmake: specify source file extensions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1645
2018-01-11 10:19:25 -05:00
Brad King
fe8d74cc60 Merge topic 'cuda_msvc_support_complex_gencode_signatures'
a91fde13 CUDA: gencode signature that list multiple code types now supported.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1618
2018-01-11 10:18:11 -05:00
Kitware Robot
b2369ad409 CMake Nightly Date Stamp 2018-01-11 00:01:51 -05:00
Sebastian Holtermann
513eb014eb Autogen: Ignore not existing source files in cmMakefile
Until CMake 3.10 a list of source files that had the AUTOUIC_OPTIONS property
populated was kept in `cmMakefile::QtUiFilesWithOptions`.  In the process to
remove all AUTOUIC related code from `cmMakefile` for CMake 3.10, the pre
filtered list was replaced by a loop in `cmQtAutoGeneratorInitializer` over
all source files in the `cmMakefile`.  This loop introduced the problem that
file paths were computed for source files that weren't in the target's sources
and that might not even have existed.  If the path for an unused and not
existing file was computed a `cmake::FATAL_ERROR` with the error message
"Cannot find source file:" was thrown nevertheless.
This caused some projects to fail in CMake 3.10.

This patch adds a test for path errors in the loops in
`cmQtAutoGeneratorInitializer` that iterate over all source files in a
`cmMakefile`. If a path error appears, the file is silently ignored.
If the file is part of the target's sources, the path error will still be
caught in the loop over all the target's sources.

Closes #17573
Closes #17589
2018-01-10 18:57:08 +01:00
Robert Maynard
a91fde135d CUDA: gencode signature that list multiple code types now supported.
Fixes #17263
2018-01-10 10:45:57 -05:00
Brad King
1be22978e0 Merge topic 'serverTestInfoExpandVariables'
2c1ecab6 server: Expand generator expressions for test info

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1633
2018-01-10 10:34:24 -05:00
Kitware Robot
89ec1aacd7 CMake Nightly Date Stamp 2018-01-10 00:01:50 -05:00
Craig Scott
e44c5828d3 Merge topic 'add_cuda_to_source_regex'
81868e6b CUDA: Add cu as default source file extension

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !1629
2018-01-09 16:15:11 -05:00
Brad King
847110e6fa Merge topic 'vs10-target-generator-range-for'
d09af946 VS: Modernize 'for' loops in cmVisualStudio10TargetGenerator to C++11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !1617
2018-01-09 09:34:08 -05:00
Brad King
e2edc9280c Merge topic 'vs-ranged-for'
92c7b526 VS: Use range-based 'for' loops in generator code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !1616
2018-01-09 09:33:33 -05:00
Ben Boeckel
efd279cdfb cmake: specify source file extensions 2018-01-09 09:21:09 -05:00
Kitware Robot
b9bada655e CMake Nightly Date Stamp 2018-01-09 00:01:07 -05:00
Robert Maynard
81868e6bad CUDA: Add cu as default source file extension 2018-01-08 16:16:52 -05:00
Brad King
f4a3143940 Merge topic 'execute_process_UTF8_keyword'
8caec41e execute_process: Allow UTF-8 as a synonym for the UTF8 keyword

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !1623
2018-01-08 10:44:47 -05:00
Brad King
a3bba2a5ad Merge topic '17431-iphone-deployment-target'
4017bf40 Darwin: Emit deployment target that matches the SDK
8f4663ff Xcode: rename embedded SDK query function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1447
2018-01-08 09:58:11 -05:00
Kitware Robot
2c089d80de CMake Nightly Date Stamp 2018-01-08 00:01:04 -05:00
Kitware Robot
e0560c1111 CMake Nightly Date Stamp 2018-01-07 00:01:05 -05:00
Kitware Robot
0a87dbf568 CMake Nightly Date Stamp 2018-01-06 00:01:05 -05:00
Kitware Robot
91a1446d21 CMake Nightly Date Stamp 2018-01-05 00:01:37 -05:00
Craig Scott
d88451568d Merge topic 'various-typos'
3ab7bf82 Various typo fixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1626
2018-01-04 14:37:49 -05:00
Kitware Robot
bc7fd08f23 CMake Nightly Date Stamp 2018-01-04 00:01:26 -05:00
Justin Goshi
2c1ecab64d server: Expand generator expressions for test info 2018-01-03 16:49:00 -08:00
Luz Paz
3ab7bf8285 Various typo fixes
Some are user-facing. Others are source comments.
2018-01-04 06:52:01 +11:00
Kitware Robot
64b624f118 CMake Nightly Date Stamp 2018-01-03 00:01:33 -05:00
Kitware Robot
011f2de484 CMake Nightly Date Stamp 2018-01-02 00:01:09 -05:00
Kitware Robot
8111a6b665 CMake Nightly Date Stamp 2018-01-01 00:01:06 -05:00
Kitware Robot
6eaa984e3a CMake Nightly Date Stamp 2017-12-31 00:01:09 -05:00
Kitware Robot
f408a60443 CMake Nightly Date Stamp 2017-12-30 00:01:08 -05:00
Kitware Robot
3e1f5b11e0 CMake Nightly Date Stamp 2017-12-29 00:01:11 -05:00
Kitware Robot
cd2ed4b87a CMake Nightly Date Stamp 2017-12-28 00:01:07 -05:00
Craig Scott
8caec41e6e execute_process: Allow UTF-8 as a synonym for the UTF8 keyword
UTF-8 is the proper naming according to the UTF-8 RFC and is also the
name used for a similar keyword in the file() command. This commit
brings (backward compatible) consistency to the keyword names and allows
the standard UTF-8 name to be used with execute_process(). The old UTF8
keyword is still supported.
2017-12-27 21:56:00 +11:00
Kitware Robot
497f4bb941 CMake Nightly Date Stamp 2017-12-27 00:01:13 -05:00
Kitware Robot
77f6fdfc2f CMake Nightly Date Stamp 2017-12-26 00:01:05 -05:00
Kitware Robot
63367d2840 CMake Nightly Date Stamp 2017-12-25 00:01:09 -05:00
Kitware Robot
40dea7e4b2 CMake Nightly Date Stamp 2017-12-24 00:01:09 -05:00
Brad King
0d22a23fd2 Merge topic 'self-c++17'
31d59ff3 Compile CMake as C++17 if supported by the compiler
31c6b9ad Generalize check for C++14 constructs
05af537e cmGlobalNinjaGenerator: Avoid using deprecated std::ptr_fun

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com>
Merge-request: !1614
2017-12-23 08:19:47 -05:00
Kitware Robot
89ed729af1 CMake Nightly Date Stamp 2017-12-23 00:01:14 -05:00
Gregor Jasny
4017bf40de Darwin: Emit deployment target that matches the SDK
Closes: #17431
2017-12-22 21:56:53 +01:00
Gregor Jasny
8f4663ffb2 Xcode: rename embedded SDK query function 2017-12-22 21:56:53 +01:00
Brad King
31d59ff3b1 Compile CMake as C++17 if supported by the compiler
Add a check that a simple source file can compile as C++17 that uses
some of the features we need.  Do this only when hosted by CMake 3.8
or above because those versions are aware of C++17.

Check for unordered_map as we do in bootstrap since commit 375eca7881
(bootstrap: Check support for unordered_map from compiler mode,
2017-11-30).  Also maintain the existing C++14 cstdio check.
2017-12-22 09:05:54 -05:00
Brad King
31c6b9adbf Generalize check for C++14 constructs
The check for C++14 and cstdio is a special case of the more general
problem of checking that the compiler's C++14 mode supports everything
we need.  Rename the checks accordingly.
2017-12-22 09:05:54 -05:00
Kitware Robot
1f29bc4092 CMake Nightly Date Stamp 2017-12-22 00:01:26 -05:00
Vitaly Stakhovsky
d09af94619 VS: Modernize 'for' loops in cmVisualStudio10TargetGenerator to C++11
'auto' used for complex types
2017-12-21 14:55:30 -05:00
Vitaly Stakhovsky
92c7b52607 VS: Use range-based 'for' loops in generator code
Use `auto` for complex types.
2017-12-21 14:52:49 -05:00
Brad King
05af537ecc cmGlobalNinjaGenerator: Avoid using deprecated std::ptr_fun
It was deprecated by C++11 and removed by C++17.  Use a C++11 lambda.
2017-12-21 08:05:23 -05:00