Commit Graph

6374 Commits

Author SHA1 Message Date
Alex Turbov
6cc93b370e message(): Add support for log levels
Relates: #18943
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2019-04-28 22:45:44 +10:00
Zack Galbreath
95db11fdb1 ctest: Include ChangeId in Update.xml 2019-04-23 14:56:46 -04:00
Brad King
800b2aad13 Merge topic 'sunpro-cxx14-features'
66f3f11af5 SunPro: Record support for C++14 features by SunPro 5.{14,15}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3248
2019-04-22 08:26:56 -04:00
Brad King
d0e3701861 Merge topic 'msvc-warning-flags'
1baf122cd4 MSVC: Do not add /W3 to CMAKE_<LANG>_FLAGS by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3250
2019-04-22 07:51:01 -04:00
Brad King
cb23f2ac8b Merge topic 'vs-default-platform'
db02be85a0 VS: Provide the default platform name to project code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3246
2019-04-22 07:38:33 -04:00
Brad King
1baf122cd4 MSVC: Do not add /W3 to CMAKE_<LANG>_FLAGS by default
We do not add default warning flags on other compilers, and having
a warning flag in the default flags makes it hard for projects to
customize the warning level.  They need to use string processing
to remove `/W3` from `CMAKE_{C,CXX}_FLAGS`.  Therefore we should
drop it.

However, projects may be using string processing to replace `/W3`
with another flag, so we cannot simply drop it.  Add a policy to
drop it in a compatible way.

Fixes: #18317
2019-04-19 12:56:49 -04:00
Brad King
66f3f11af5 SunPro: Record support for C++14 features by SunPro 5.{14,15}
SunPro 5.15 supports `-std=c++14` and several C++14 features.

SunPro 5.14 accepts `-std=c++14` but does not update its definition of
`__cplusplus` or any other macro to distinguish it from `-std=c++11`,
so we need to blacklist a couple features that do work but that we
cannot report for that version.  We can still support `cxx_std_14`.

Co-Author: Robert Maynard <robert.maynard@kitware.com>
2019-04-19 09:14:00 -04:00
Brad King
db02be85a0 VS: Provide the default platform name to project code
The value of `CMAKE_VS_PLATFORM_NAME` is computed by Visual Studio
generators based on `CMAKE_GENERATOR_PLATFORM` or some default.
Prior to the VS 2019 generator, the default was always `Win32`.
However, for the `Visual Studio 16 2019` generator, the default is
based on the host platform.

Store the default in a new `CMAKE_VS_PLATFORM_NAME_DEFAULT` variable for
use by project code.  This is particularly useful in toolchain files
because they are allowed to set `CMAKE_GENERATOR_PLATFORM` and so
`CMAKE_VS_PLATFORM_NAME` is not yet known.  Of course the toolchain file
author knows whether it will set `CMAKE_GENERATOR_PLATFORM`, and if not
then `CMAKE_VS_PLATFORM_NAME_DEFAULT` provides the platform name that
will be used.

Fixes: #19177
2019-04-19 07:46:13 -04:00
Brad King
a9428fc473 Tests: Fix FindPackageTest when path to source has a symlink
Exclude a portion of the test that does not work in this case.
2019-04-18 16:01:33 -04:00
Brad King
e27437d0e0 Tests/FindPackageTest: Tell Git to ignore temporary symlink path 2019-04-18 16:00:50 -04:00
Brad King
2ed688a863 Merge topic 'msvc-runtime-library'
fb3370b6a1 MSVC: Add abstraction for runtime library selection
f621e7fa5d VS: Fix Fortran runtime library flag map special case for '-' options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-by: Leonid Pospelov <pospelovlm@yandex.ru>
Merge-request: !3211
2019-04-17 11:01:37 -04:00
Brad King
fb3370b6a1 MSVC: Add abstraction for runtime library selection
Replace our hard-coded defaults for `/MD` and `/MDd` with a first-class
abstraction to select the runtime library from an enumeration of logical
names.  We've long hesitated to do this because the idea of "runtime
library selection" touches on related concepts on several platforms.
Avoid that scope creep by simply defining an abstraction that applies
only when targeting the MSVC ABI on Windows.

Removing the old default flags requires a policy because existing
projects may rely on string processing to edit them and choose a runtime
library under the old behavior.  Add policy CMP0091 to provide
compatibility.

Fixes: #19108
2019-04-17 11:00:44 -04:00
Brad King
2d37678226 Merge topic 'vs-project-import'
d145d72e70 VS: add target property VS_PROJECT_IMPORT_<propspath>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3143
2019-04-16 13:43:52 -04:00
Brad King
9aecda56ba Merge topic 'genex-output_name'
60ec292258 Genex: Rename $<TARGET_*_OUTPUT_NAME:...> in $<TARGET_*_FILE_BASE_NAME:...>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3228
2019-04-16 13:42:53 -04:00
Brad King
3205561b8a Merge topic 'string-repeat'
536cca60ea string: introduce `REPEAT` sub-command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3239
2019-04-16 13:40:02 -04:00
Brad King
34975815a8 Merge topic 'autogen_moc_uic_single_job_queue'
58f04b6ecf Autogen: Add ManySources test
a3f062091f Autogen: Rename `cmQtAutoGeneratorMocUic` class to `cmQtAutoMocUic`
8cb26a0a2a Autogen: Factor out concurrency framework to cmWorkerPool class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3224
2019-04-16 13:38:21 -04:00
Brad King
fc4324a27c Merge topic 'Boost-Gentoo'
0b54f72e94 FindBoost: Fix detection with version suffixes on Gentoo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3237
2019-04-16 13:34:41 -04:00
Rolf Eike Beer
0b54f72e94 FindBoost: Fix detection with version suffixes on Gentoo
The Gentoo case added by commit 1673923c30 (FindBoost: Add support for
Boost 1.67 with Python version suffixes, 2018-03-18, v3.11.0~3^2) left
out the `.` version component separator and instead duplicated the RPM
case.  Add the missing `.` now.

Fixes: #18743
2019-04-16 13:31:27 -04:00
Leonid Pospelov
d145d72e70 VS: add target property VS_PROJECT_IMPORT_<propspath>
Fixes: #18998
2019-04-15 13:05:07 -04:00
Marc Chevrier
60ec292258 Genex: Rename $<TARGET_*_OUTPUT_NAME:...> in $<TARGET_*_FILE_BASE_NAME:...> 2019-04-15 18:22:14 +02:00
Alex Turbov
536cca60ea string: introduce REPEAT sub-command 2019-04-15 11:06:06 -04:00
Brad King
0793464d95 Merge topic 'ghs_custom'
2bae6a1346 GHS: Update tests and notes
3b415c60c1 GHS: Update ExternalProject for GHS tools
83c47ef5b8 GHS: Update project layout to accommodate gbuild inconsistencies
5d2e1404bd GHS: Update project layout to build targets correctly
b6bfa7eeb2 GHS: Support add_dependencies() command
39ee9718d9 GHS: Support add_custom_target() command
8d3dad9a76 GHS: Support add_custom_command( OUTPUT ) signature
37acc9e229 GHS: Update custom command build events

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Narendhar Manimohan <narendhar15@gmail.com>
Merge-request: !3119
2019-04-15 10:52:21 -04:00
Sebastian Holtermann
58f04b6ecf Autogen: Add ManySources test
The QtAutogen/ManySources test generates a number of source, header, .ui and
.qrc files that get AUTOMOC, AUTOUIC and AUTORCC processed.  This stresses the
concurrency framework in `cmQtAutoMocUic` and should reveal any issues
with that.
2019-04-15 16:07:14 +02:00
Brad King
e3ebad7def Merge topic 'genex-target-prefix-suffix'
b70bac647d Genex: add $<TARGET_FILE_PREFIX:...> and $<TARGET_FILE_SUFFIX:...>
f65763fe9b Refactor: Add new methods to retrieve prefix and suffix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3207
2019-04-12 10:22:33 -04:00
Brad King
4adc0b7c75 Merge topic 'iface-headers'
a40f9083dd INTERFACE Target: allow (PUBLIC/PRIVATE)_HEADER properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3181
2019-04-12 10:20:20 -04:00
Brad King
f70367e4ed Merge topic 'cmSystemTools-StringToULong-negatives'
f0948499f6 cmSystemTools: Fix StringToULong to reject negative numbers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3216
2019-04-12 07:58:52 -04:00
Brad King
680641a882 Merge topic 'xcode-extra-sources'
428c1e429f Xcode: Avoid mutating App Bundle targets during generation
b4385d5ccc Xcode: Factor out duplicate source group code into lambda

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3208
2019-04-12 07:23:31 -04:00
Fred Baksik
2bae6a1346 GHS: Update tests and notes
-- add new tests for custom commands
-- minor test cleanup

Fixes #15995
Fixes #18909
Fixes #15902
2019-04-11 13:15:51 -04:00
Fred Baksik
5d2e1404bd GHS: Update project layout to build targets correctly
-- Restructure projects and files to support proper building of targets
   Build order is determined by hierarchy of project files and folders
   Custom targets may have been run multiple times in the original file / folder structure
-- Default to build targets that are part of ALL target
-- List all known targets for this project
   Includes global targets for ALL_BUILD and INSTALL
-- Compute build order for building targets
2019-04-11 13:15:50 -04:00
Brad King
f0948499f6 cmSystemTools: Fix StringToULong to reject negative numbers
Fixes: #19161
2019-04-11 12:56:32 -04:00
Avraham Shukron
a40f9083dd INTERFACE Target: allow (PUBLIC/PRIVATE)_HEADER properties
Also support installing headers on an INTERFACE library.

Signed-off-by: Avraham Shukron <avraham.shukron@gmail.com>
Fixes: #15234
2019-04-11 11:09:42 -04:00
Brad King
7bad2464fc Merge branch 'xcode-extra-sources' into release-3.14
Merge-request: !3208
2019-04-11 10:35:49 -04:00
Brad King
428c1e429f Xcode: Avoid mutating App Bundle targets during generation
For `MACOSX_BUNDLE` targets we generate an `Info.plist` automatically
and add it to the sources presented to Xcode.  Avoid mutating the
original target's list of sources to achieve this.  Otherwise when we
generate the same target again (e.g. in a sub-project's Xcode file) it
will look different than the first time and possibly break invariants.

Fixes: #19114
2019-04-11 10:35:14 -04:00
Brad King
a550e2d6e4 Merge topic 'test-autogen-GAT-generator'
06dab0f0e5 Tests: Fix Qt*Autogen.GlobalAutogenTarget to use matching generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3210
2019-04-11 10:13:47 -04:00
Brad King
5ae15061c3 Merge topic 'test-explicit-dirs'
39e7fd8c68 Tests: Avoid enabling languages in RunCMake.CommandLine -S and -B cases
baed22c4b0 Tests: Fix RunCMake.CommandLine test to use generator with -S and -B
44d6370db3 Tests: Add RunCMake helper to run cmake with options
538721939f Tests: Teach RunCMake to optionally exclude the source dir argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3209
2019-04-11 10:12:32 -04:00
Marc Chevrier
b70bac647d Genex: add $<TARGET_FILE_PREFIX:...> and $<TARGET_FILE_SUFFIX:...>
These capabilities complement MR !3190
and is also needed to solve issue #18771.
2019-04-10 23:45:12 +02:00
Brad King
06dab0f0e5 Tests: Fix Qt*Autogen.GlobalAutogenTarget to use matching generator
Build the GAT project with the same generator as the rest of the test.
This was accidentally left out of commit 8c8731b422 (Autogen: Add test
for CMAKE_GLOBAL_AUTOGEN/RCC_TARGET, 2018-11-11, v3.14.0-rc1~396^2~2).
2019-04-10 10:01:19 -04:00
Brad King
39e7fd8c68 Tests: Avoid enabling languages in RunCMake.CommandLine -S and -B cases
The test project does not compile any sources and so does not
need to enable any languages.
2019-04-10 09:40:48 -04:00
Brad King
baed22c4b0 Tests: Fix RunCMake.CommandLine test to use generator with -S and -B
The `-S` and `-B` command-line option tests do generate build systems
and so should use the generator being tested.
2019-04-10 09:40:48 -04:00
Brad King
44d6370db3 Tests: Add RunCMake helper to run cmake with options 2019-04-10 09:40:48 -04:00
Brad King
538721939f Tests: Teach RunCMake to optionally exclude the source dir argument 2019-04-10 09:40:48 -04:00
Brad King
876680e94b Merge topic 'meta-feature_only_infer_granular_support'
613ac56e50 Add a test to verify meta-feature parity with granular features
b0f46c48f6 CompileFeatures: Now able to presume full language level support
646fb1a646 CompileFeatures: memoize C++ compilers with full language level support
0d641fcfad Tests: Remove outdated portion of CompileFeatures genex test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3176
2019-04-10 08:49:21 -04:00
Robert Maynard
613ac56e50 Add a test to verify meta-feature parity with granular features 2019-04-09 08:44:56 -04:00
Robert Maynard
b0f46c48f6 CompileFeatures: Now able to presume full language level support
Previously compilers that only supported the meta-level flags
would not have any of the granular features listed. Now we
presume that they have full support and enable all the features.

Update granular feature tests to skip the actual compilation
checks for the presumed features.
2019-04-09 08:44:56 -04:00
Brad King
0d641fcfad Tests: Remove outdated portion of CompileFeatures genex test
The genex part of the test verifies that `$<COMPILE_FEATURES:...>`
evaluates as expected.  It does not need to actually try using code with
the associated features, as that is tested separately.
2019-04-09 08:44:56 -04:00
Brad King
aa0692de67 Merge topic 'argument-parser'
b783e62533 cmExecuteProcessCommand: Port to cmArgumentParser
9bddb03f31 cmParseArgumentsCommand: Port to cmArgumentParser
45edf1ad66 Retire cmCommandArgumentsHelper
f5acecaa6f cmExportCommand: Port to cmArgumentParser
e6b6bb0618 cmInstallCommand: Port to cmArgumentParser
4336a29edd cmFileCommand: Port to cmArgumentParser
4359fe133b Introduce cmArgumentParser

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Leonid Pospelov <pospelovlm@yandex.ru>
Merge-request: !3137
2019-04-09 08:27:31 -04:00
Brad King
0e953e138b Merge topic 'implicit-includes-relative'
442f4c4902 Merge branch 'backport-implicit-includes-relative'
ef41d49812 Fix implicit include directory extraction for adaptive relative paths
6bc6fc2a7f Tests: Teach RunCMake.ParseImplicitIncludeInfo to match output by regex
82948805ec Tests: Clarify hand-written cases in RunCMake.ParseImplicitIncludeInfo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3204
2019-04-09 07:59:52 -04:00
Sebastian Lipponer
698f51abac Genex: Add $<FILTER:list,INCLUDE|EXCLUDE,regex> 2019-04-08 19:57:22 +02:00
Brad King
442f4c4902 Merge branch 'backport-implicit-includes-relative' 2019-04-08 10:16:47 -04:00
Brad King
ef41d49812 Fix implicit include directory extraction for adaptive relative paths
In some cases GCC reports *relative* implicit include directories.  They
are computed adaptively with respect to the current working directory
such that the effective implicit include directory is an unchanging
absolute path.  Teach our implicit include directory extraction to
recognize such paths and normalize them.

Fixes: #19133
2019-04-08 10:12:22 -04:00