Commit Graph

26126 Commits

Author SHA1 Message Date
Artur Ryt
c28abdb5ac cmCursesMainForm: Fix lambda return type deducing warning
It was issued by sparc compiler on Solaris system
See !2947
2019-02-12 19:24:53 +01:00
Brad King
ded4bc136e Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2019-02-12 (44676809)
2019-02-12 08:35:12 -05:00
Brad King
9d2ab63aaf Merge topic 'clangcl-fixes'
091afa7342 Tests: Teach tests when to treat clang-cl as MSVC
006768903c Work around clang-cl breakage on make_unique/std::forward
d625dfcdf9 Avoid compiling CMake itself as C++17 with Clang's MSVC ABI

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2573
2019-02-12 08:31:00 -05:00
Brad King
20afd497c9 Merge topic 'progress-stdstring'
950c099d83 cmake: Progress functions use `std::string` param

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2948
2019-02-12 08:30:13 -05:00
Brad King
a7a8571933 Merge topic 'modernize-cmCursesMainForm'
f6291eee25 cmCursesMainForm: Modernize with STL and ranged-for loops

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2947
2019-02-12 08:29:08 -05:00
Brad King
c0ba467d2d Merge topic 'cmCTestRunTest-compress'
948c55857e cmCTestRunTest: Remove duplicated compression logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2946
2019-02-12 08:28:24 -05:00
Kitware Robot
64ae72c52a CMake Nightly Date Stamp 2019-02-12 00:01:06 -05:00
Vitaly Stakhovsky
080a79ca4a cmSystemTools: More methods accept std::string params 2019-02-11 18:11:59 -05:00
Saleem Abdulrasool
fc8b90af2c Create and use cmGeneratorTarget::Names
Rather than taking a number of out parameters for the various names,
create a structure that is reused for both `GetLibraryNames` and
`GetExecutableNames`.  Replace uses according to the new interface.
2019-02-11 10:44:24 -08:00
Vitaly Stakhovsky
950c099d83 cmake: Progress functions use std::string param 2019-02-11 10:32:43 -05:00
Zsolt Parragi
006768903c Work around clang-cl breakage on make_unique/std::forward
Clang on Windows with the MSVC ABI produces link errors of the
form `unresolved std::_Iosb<int>::{app,_Openmode} in ...`.
Use a temporary variable to forward as lvalue rather than rvalue
to work around the problem.
2019-02-11 15:04:28 +01:00
Zsolt Parragi
d625dfcdf9 Avoid compiling CMake itself as C++17 with Clang's MSVC ABI
GUID functions in ATL cause compilation errors with this compiler.
Add the offending case to our check for C++17 support so that it
is not used by default when it does not work.
2019-02-11 15:04:19 +01:00
Brad King
8a1d25afdf Merge topic 'ctest-exit-code-int64'
440b08e4f0 CTest: Represent process exit codes as 64-bit signed integer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2944
2019-02-11 08:08:56 -05:00
Brad King
4b37b4f1bb Merge topic 'modernize-for-loops'
01b2d6ab74 Modernize: Use ranged for-loops when possible
15bdbec017 cmAlgorithms: Make cmRange advance/retreat safe for rvalues

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !2901
2019-02-11 08:08:22 -05:00
Brad King
5651568d14 Merge topic 'ghs-updates'
bcd99fac60 GHS: Document usage of GHS_NO_SOURCE_GROUP_FILE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2943
2019-02-11 07:45:23 -05:00
Brad King
d9ddb30e92 Merge topic 'fix-exclude-dir-with-iface'
f87e724e8c Fix EXCLUDE_FROM_ALL on directory with an interface library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2937
2019-02-11 07:44:40 -05:00
Kitware Robot
56c2eab1e2 CMake Nightly Date Stamp 2019-02-11 00:01:16 -05:00
Artur Ryt
f6291eee25 cmCursesMainForm: Modernize with STL and ranged-for loops 2019-02-10 19:07:50 +01:00
Regina Pfeifer
948c55857e cmCTestRunTest: Remove duplicated compression logic 2019-02-10 15:47:15 +01:00
Kitware Robot
e7d319714d CMake Nightly Date Stamp 2019-02-10 00:01:05 -05:00
Kitware Robot
2f2295ec9e CMake Nightly Date Stamp 2019-02-09 00:01:07 -05:00
Zsolt Parragi
440b08e4f0 CTest: Represent process exit codes as 64-bit signed integer
Exit code constants on Windows, such as `STATUS_NO_MEMORY` do not fit in
a 32-bit signed integer type.  They do fit in an unsigned 32-bit type,
but for compatibility with UNIX semantics we treat exit codes as signed.
Use a 64-bit signed integer to handle both.
2019-02-08 14:49:20 -05:00
Brad King
88031dd09a Merge branch 'ghs-updates' into release-3.14
Merge-request: !2943
2019-02-08 14:02:14 -05:00
Brad King
3b58b647ae Merge branch 'fix-exclude-dir-with-iface' into release-3.14
Merge-request: !2937
2019-02-08 14:02:03 -05:00
Fred Baksik
bcd99fac60 GHS: Document usage of GHS_NO_SOURCE_GROUP_FILE
-- Also change variable name to CMAKE_GHS_NO_SOURCE_GROUP_FILE
2019-02-08 13:07:00 -05:00
Kyle Edwards
18b0329a81 Merge topic 'cmake_parse_arguments-keywords_missing_values'
5228432b45 cmake_parse_arguments: add KEYWORDS_MISSING_VALUES
8e746db6e1 cmake_parse_arguments: Factor out part of implementation for re-use

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2910
2019-02-08 12:14:46 -05:00
Brad King
89ca5d7fdc Merge topic 'message-stdstring'
82edd98300 cmSystemTools: MessageCallback and Message() accept std::string argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2929
2019-02-08 08:49:35 -05:00
Brad King
bf12794504 Merge topic 'getreqdef'
00ba28ffd0 cmMakefile::GetRequiredDefinition: return const std::string&

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2930
2019-02-08 08:48:51 -05:00
Brad King
9783825de5 Merge topic 'runsinglecommand'
65baaa0e37 cmSystemTools::RunSingleCommand: Accept std::string argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2927
2019-02-08 08:47:56 -05:00
Brad King
f87e724e8c Fix EXCLUDE_FROM_ALL on directory with an interface library
Since commit dc6888573d (Pass EXCLUDE_FROM_ALL from directory to
targets, 2019-01-15, v3.14.0-rc1~83^2) we automatically forward the
`EXCLUDE_FROM_ALL` to targets as they are created.  This regressed
support for interface libraries on which the property is not allowed.

Skip forwarding the `EXCLUDE_FROM_ALL` property for interface libraries.
It is not needed on them because they do not participate in the
generated build system anyway.

Fixes: #18896
2019-02-08 08:17:48 -05:00
Kitware Robot
3f0a5b3fe8 CMake Nightly Date Stamp 2019-02-08 00:01:07 -05:00
Artur Ryt
01b2d6ab74 Modernize: Use ranged for-loops when possible
Replaced most manual `const_iterator`-based loops and some
reverse-iterator loops with range loops.

Fixes: #18858
2019-02-07 22:39:05 +01:00
Artur Ryt
15bdbec017 cmAlgorithms: Make cmRange advance/retreat safe for rvalues
In rvalue context these functions have to return cmRange
by copy instead of reference to temporary object

It allows to use ranged-for over cmMakeRange(xxx).advance(yyy)
2019-02-07 22:38:12 +01:00
Vitaly Stakhovsky
82edd98300 cmSystemTools: MessageCallback and Message() accept std::string argument 2019-02-07 13:41:27 -05:00
Brad King
41802ef35d Merge topic 'prefer-front-back-over-begin-rbegin'
f3534386b5 Prefer front/back/data over dereferencing begin/rbegin iter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !2914
2019-02-07 13:30:31 -05:00
Torsten Robitzki
5228432b45 cmake_parse_arguments: add KEYWORDS_MISSING_VALUES
Add KEYWORDS_MISSING_VALUES output variable to cmake_parse_arguments() to
allow to detect keywords that received no values.

Fixes: #18706
2019-02-07 12:59:10 -05:00
Vitaly Stakhovsky
00ba28ffd0 cmMakefile::GetRequiredDefinition: return const std::string& 2019-02-07 07:35:16 -05:00
Brad King
7df10748e2 Merge topic 'xcode-stdlib-flags'
8af334f5ba Xcode: Derive stdlib from CXX flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2919
2019-02-07 06:45:42 -05:00
Brad King
f657bcbd48 Merge branch 'xcode-stdlib-flags' into release-3.14
Merge-request: !2919
2019-02-07 06:44:19 -05:00
Gregor Jasny
8af334f5ba Xcode: Derive stdlib from CXX flags
Closes: #18396
2019-02-07 06:43:51 -05:00
Brad King
f60ec9e63a Merge topic 'vs-csharp-nowarn-numbers'
822697996e VS: Fix nowarn compiler option to accept warning numbers.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2923
2019-02-07 06:42:30 -05:00
Brad King
f835526d8f Merge branch 'vs-csharp-nowarn-numbers' into release-3.14
Merge-request: !2923
2019-02-07 06:41:22 -05:00
Wil Stark
822697996e VS: Fix nowarn compiler option to accept warning numbers.
Warning disables are transferred to the VS IDE `<NoWarn>` node.

Fixes: #18878
2019-02-07 06:39:45 -05:00
Kitware Robot
c2ffcb3aab CMake Nightly Date Stamp 2019-02-07 00:01:07 -05:00
Torsten Robitzki
8e746db6e1 cmake_parse_arguments: Factor out part of implementation for re-use 2019-02-06 14:46:52 -05:00
Vitaly Stakhovsky
65baaa0e37 cmSystemTools::RunSingleCommand: Accept std::string argument 2019-02-06 11:02:10 -05:00
Artur Ryt
f3534386b5 Prefer front/back/data over dereferencing begin/rbegin iter
Changed for sequenced containers: vector, list, string and array
2019-02-06 10:43:16 -05:00
Brad King
062cfd991f Begin post-3.14 development 2019-02-06 10:11:11 -05:00
Brad King
bf1c2a2593 CMake 3.14.0-rc1 version update 2019-02-06 10:08:35 -05:00
Brad King
d6729505cb Merge topic 'relax_CUDA_RESOLVE_DEVICE_SYMBOLS_constraints'
850ef90a66 CUDA: Honor CUDA_RESOLVE_DEVICE_SYMBOLS for more target types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2900
2019-02-06 06:51:30 -05:00
Brad King
4400ac07f7 Merge topic 'autogen_same_name_different_extension'
a28caabf45 Autogen: AUTOMOC support for files with the same name but different extensions
1f802295f2 Autogen: Extend the SameName test with same name but different extension files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2920
2019-02-06 06:50:36 -05:00
Kitware Robot
3a2387bce7 CMake Nightly Date Stamp 2019-02-06 00:01:07 -05:00
Robert Maynard
850ef90a66 CUDA: Honor CUDA_RESOLVE_DEVICE_SYMBOLS for more target types
`CUDA_RESOLVE_DEVICE_SYMBOLS` can be used with shared, module, and
executable target types.  This relaxation is to allow for better
interoperability with linkers that automatically do CUDA device symbol
resolution and have no way to disable it.
2019-02-05 11:09:48 -05:00
Sebastian Holtermann
a28caabf45 Autogen: AUTOMOC support for files with the same name but different extensions
This adds support for AUTOMOC to moc header files with the same but different
extensions (e.g `obj.h`, `obj.hpp`, `obj.hxx`).  If a moc file would appear
multiple times in `mocs_compilation.cpp`, a number suffix is appended
to the name to make it unique.

Closes #14489
2019-02-05 15:51:53 +01:00
Brad King
f47d980f73 Merge topic 'update-kwsys'
9ddbf4c6e6 Merge branch 'upstream-KWSys' into update-kwsys
8372c05472 KWSys 2019-02-05 (65802a20)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2918
2019-02-05 07:49:07 -05:00
Brad King
ab01ce91ee Merge topic 'autogen_single_all_sources_iteration'
b6cf086267 Autogen: Iterate over makefile sources only once
ed0fa784eb cmSystemTools: Let `GetFileFormat` accept a `std::stding const&`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2909
2019-02-05 07:47:14 -05:00
Brad King
c6d679f0d9 Merge topic 'vs-fortran-target-check'
d3d2c3cd49 VS: Fix Fortran target type selection when linking C++ targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2913
2019-02-05 07:36:36 -05:00
Brad King
25e616862d Merge topic 'swift-xcode-10.2'
96dece6dc1 Xcode: Update default Swift language version for Xcode 10.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2912
2019-02-05 07:29:59 -05:00
Brad King
9ddbf4c6e6 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2019-02-05 (65802a20)
2019-02-05 07:20:34 -05:00
Kitware Robot
762a41fd19 CMake Nightly Date Stamp 2019-02-05 00:01:05 -05:00
Brad King
d3d2c3cd49 VS: Fix Fortran target type selection when linking C++ targets
Since commit 2c9f35789d (VS: Decide project type by linker lang as
fallback, 2017-03-30, v3.9.0-rc1~340^2) we consider the linker language
when detecting whether to generate a `.vfproj` or `.vcxproj` file.
However, this could cause C-only projects to become `.vfproj` files if
they link to Fortran projects.  Instead we should consider only the
`LINKER_LANGUAGE` property on the target itself.  This approach is
already used for CSharp.  It allows project code to specify the project
file type for a target with no sources but does not allow linked targets
to affect it.

Fixes: #18687
2019-02-04 14:13:46 -05:00
Brad King
96dece6dc1 Xcode: Update default Swift language version for Xcode 10.2
Xcode 10.2 no longer supports Swift language versions before 4.0.

Fixes: #18871
2019-02-04 13:26:10 -05:00
Brad King
6e91f5d620 Merge topic 'cmSourceFile_refactor'
254b7260f4 cmSourceFile: Check if a file is GENERATED first in the full path computation
cd8a930d61 cmSourceFile: Refactor FindFullPath method
6d407ae439 Use cmSourceFile::GetIsGenerated
2ddf3f4467 cmSourceFile: Add IsGenerated method
b9d44fc350 cmSourceFile: Additional static property strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2908
2019-02-04 08:04:31 -05:00
Brad King
a5ec7f868f Merge topic 'vs-wince-deployment'
f5d72be57a VS: Fix deployment for WinCE projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2907
2019-02-04 07:49:01 -05:00
Brad King
40e1288260 Merge topic 'winrtrefs'
cff026dbc0 VS: Fix WinRT component references
6c21722adb Tests: Fix VSWinStorePhone test with Windows 10 SDK 17763

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2906
2019-02-04 07:47:15 -05:00
Brad King
dc4a2749a5 Merge topic 'set-env-warning'
cb01b8c8ba set: warn of extra arguments after ENV value.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2903
2019-02-04 07:46:29 -05:00
Kitware Robot
d401c10db5 CMake Nightly Date Stamp 2019-02-04 00:01:05 -05:00
Kitware Robot
149402898c CMake Nightly Date Stamp 2019-02-03 00:01:05 -05:00
Sebastian Holtermann
b6cf086267 Autogen: Iterate over makefile sources only once
In QtAutoGen we used to iterate over all makefile source two times to
extract file parameters for moc and uic respectively.  This patch merges both
iterations into one loop. This makes the code easier to understand and likely
faster to execute as well.
2019-02-02 18:42:08 +01:00
Sebastian Holtermann
ed0fa784eb cmSystemTools: Let GetFileFormat accept a std::stding const&
The `const char*` used formerly was converted to a `std::string`
internally anyway.
2019-02-02 18:42:08 +01:00
Sebastian Holtermann
254b7260f4 cmSourceFile: Check if a file is GENERATED first in the full path computation
In `cmSourceFile::FindFullPath` check first if the file is GENERATED before
aborting on `FindFullPathFailed`.  This allows recomputation of the full path
when the GENERATED property was set after the file path was computed with an
error.
2019-02-02 18:39:22 +01:00
Sebastian Holtermann
cd8a930d61 cmSourceFile: Refactor FindFullPath method
Refactors the cmSourceFile::FindFullPath method to
use lambdas.
2019-02-02 18:39:22 +01:00
Kitware Robot
dfec0f4a11 CMake Nightly Date Stamp 2019-02-02 00:01:06 -05:00
Wil Stark
f5d72be57a VS: Fix deployment for WinCE projects
Fixes: #18868
2019-02-01 13:59:09 -05:00
Gilles Khouzam
cff026dbc0 VS: Fix WinRT component references
WinRT components need to be referenced in a similar way that managed
code libraries are referenced.  Validate that the library reference is a
WinRT component and reference it through the project.

Add test coverage for `VS_WINRT_COMPONENT`.  While at it, fix the IOT
reference failing on Win10 SDK 17763 which doesn't include it anymore.

Fixes: #18846
2019-02-01 13:04:52 -05:00
Sebastian Holtermann
6d407ae439 Use cmSourceFile::GetIsGenerated 2019-02-01 17:02:53 +01:00
Sebastian Holtermann
2ddf3f4467 cmSourceFile: Add IsGenerated method
All cmSourceFiles are checked at least once whether they're `GENERATED` or not.
This adds a convenience method `GetIsGenerated` that returns a private
boolean cache variable `IsGenerated`.  `IsGenerated` is updated every time the
`GENERATED` property is written.
2019-02-01 16:55:35 +01:00
Sebastian Holtermann
b9d44fc350 cmSourceFile: Additional static property strings 2019-02-01 16:21:32 +01:00
Brad King
cf3af44af2 Merge topic 'server-normalize-paths'
1c6c2bae28 cmake-server: Normalize build and source directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2898
2019-02-01 08:11:19 -05:00
Taylor Holberton
cb01b8c8ba set: warn of extra arguments after ENV value.
Fixes: #18842
2019-02-01 06:10:34 -05:00
Kitware Robot
9512a58238 CMake Nightly Date Stamp 2019-02-01 00:01:07 -05:00
Gregor Jasny
1c6c2bae28 cmake-server: Normalize build and source directories
Fixes: #18862
2019-01-31 12:49:56 -05:00
Brad King
d526327079 Merge topic 'ninja-intel-depfile'
a624a3e1b3 Ninja: Use deps=gcc for Intel Compiler on Windows
f4f3b6b9af Ninja: Detect when ninja is new enough to support a multi-line depfile
699cd03212 Ninja: Drop unnecessary deptype customization infrastructure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2893
2019-01-31 11:19:38 -05:00
Brad King
29368abde7 Merge topic 'install-strip-macos'
20291e8e72 install: Fix stripping on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2892
2019-01-31 11:18:40 -05:00
Brad King
1b46f2f12a Merge topic 'xcode-object-dir'
8a7f93d000 Xcode: Fix object library builds with sanitizers enabled
eff9c69740 Xcode: Place object library artifacts outside Objects-normal directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2885
2019-01-31 11:17:40 -05:00
Brad King
ca0310b919 Merge topic 'set-validate-cache-type'
198650ae73 set: warn if CACHE type is not recognized

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2874
2019-01-31 11:16:53 -05:00
Brad King
0933707d5c Merge topic 'autogen-std-bind-to-lambdas'
d6fbd438c4 Autogen: Refactor std::bind calls to lambdas

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2766
2019-01-31 11:15:11 -05:00
Brad King
dc9f4f9eca Merge topic 'tidy-use-equals-default-fix'
3f9822ff6d clang-tidy: Silence use-equals-default warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2887
2019-01-31 11:14:21 -05:00
Brad King
fb82385515 Merge topic 'std-string-callback'
1180fc8780 OutputCallback: Accept std::string argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: vvs31415 <vstakhovsky@fastmail.com>
Merge-request: !2891
2019-01-31 11:13:34 -05:00
Brad King
24bee427b5 Merge topic 'update-kwsys'
a37614667d Configure KWSys to honor CMake_NO_CXX_STANDARD
e3b26f0004 Merge branch 'upstream-KWSys' into update-kwsys
c22e373a30 KWSys 2019-01-30 (ce89cada)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2886
2019-01-31 11:12:27 -05:00
Brad King
9eaa6aa599 Merge topic 'autogen-qt-version-from-dirprops'
91d98542d2 Merge branch 'autogen-qt-version-from-dirprops-release' into autogen-qt-version-from-dirprops-master
062d21c36a Autogen: Read the Qt version from directory properties as well
17ac7c4024 Tests: add cases for providing Qt5Core_VERSION manually
2df6d69014 AutoGen: query Qt5 version from directory properties
b598dfb65e Tests: add cases for providing Qt5Core_VERSION manually

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2883
2019-01-31 10:58:23 -05:00
Brad King
5107a84d46 Merge topic 'restore-install-late-framework'
f64099cf5e Merge branch 'backport-restore-install-late-framework'
95210d027a macOS: Restore compatibility for setting FRAMEWORK after install()
d9dd68cb60 macOS: Restore compatibility for setting FRAMEWORK after install()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !2878
2019-01-31 10:50:38 -05:00
Vitaly Stakhovsky
0779bc9393 ReadListFile: Accept std::string argument 2019-01-31 09:27:54 -05:00
Brad King
8ea30a44d3 Merge topic 'unused-members'
ea9a376085 Remove unused 'class cmake' members

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2895
2019-01-31 09:27:06 -05:00
Brad King
ea9a376085 Remove unused 'class cmake' members
* The `InTryCompile` member has been unused since commit 62854e9966
  (cmState: Move try_compile state from cmake class., 2015-04-11,
  v3.3.0-rc1~196^2~9).

* The `ConvertMessageType` and `IsMessageTypeVisible` members have been
  unused since commit 421012a330 (cmMessenger: Extract from cmake class,
  2016-01-28, v3.7.0-rc1~222^2~1).

* The `InitializeProperties` member has been unused since commit
  de722d7d63 (Move property initialization to cmState., 2015-04-06,
  v3.3.0-rc1~196^2~1).

Co-Author: Vitaly Stakhovsky <vvs31415@gitlab.org>
2019-01-31 07:15:55 -05:00
Kitware Robot
de7eb1a3d0 CMake Nightly Date Stamp 2019-01-31 00:01:06 -05:00
Harry Mallon
20291e8e72 install: Fix stripping on macOS
On macOS the `strip` tool requires special arguments depending on the
type of binary to be stripped.

Fixes: #11367
Fixes: #16499
2019-01-30 22:00:16 +00:00
Brad King
a624a3e1b3 Ninja: Use deps=gcc for Intel Compiler on Windows
Ninja 1.9 supports the depfile format generated by this compiler.
Use `deps = gcc` when the version of Ninja is new enough.

Unfortunately the Intel Compiler for Windows does not properly
escape spaces in paths written to a depfile so if there is a
space in the path we must still fall back to `deps = msvc`.

Fixes: #18855
2019-01-30 14:59:23 -05:00
Brad King
f4f3b6b9af Ninja: Detect when ninja is new enough to support a multi-line depfile
Ninja 1.9 supports the multi-line depfile format generated by the
Intel Compiler for Windows.  Teach the global generator to detect
when the version is new enough to support this.
2019-01-30 14:58:21 -05:00
Brad King
699cd03212 Ninja: Drop unnecessary deptype customization infrastructure
Do not pass `CMAKE_NINJA_DEPTYPE_<LANG>` in place of `deps = gcc`.
If Ninja ever introduces a new dependency type we will likely need
to update CMake for it anyway.
2019-01-30 14:54:35 -05:00
Brad King
eb2c23868f Merge topic 'tidy-use-equals-delete'
b05b778a2d clang-tidy: Use `= delete`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Rejected-by: vvs31415 <vstakhovsky@fastmail.com>
Merge-request: !2848
2019-01-30 14:00:58 -05:00
Regina Pfeifer
1180fc8780 OutputCallback: Accept std::string argument 2019-01-30 18:33:58 +01:00
Regina Pfeifer
3f9822ff6d clang-tidy: Silence use-equals-default warning
clang-tidy 7 has an option to suppress this warning in macros which
defaults to '1'.  Set the option to '0' and silence the warning
explicitly.
2019-01-30 17:51:07 +01:00
Sebastian Holtermann
062d21c36a Autogen: Read the Qt version from directory properties as well
This lets AUTOGEN read the Qt version from directory properties as a fallback
when the Qt version variables are empty or unset.
2019-01-30 11:30:18 -05:00
Taylor Holberton
198650ae73 set: warn if CACHE type is not recognized 2019-01-30 10:47:24 -05:00
Brad King
e3b26f0004 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2019-01-30 (ce89cada)
2019-01-30 10:36:24 -05:00
Brad King
8a7f93d000 Xcode: Fix object library builds with sanitizers enabled
Using `xcodebuild -enableAddressSanitizer YES ...` causes object files
to be placed in a different directory name.  Xcode provides a
placeholder for this that we can use in `OTHER_LDFLAGS` to reference
object files for linking the dependents of object libraries.  However,
CMake's features for installing and exporting object libraries depend on
knowing the real path with no placeholders.  For these cases, use the
default object directory.  Users will then have to choose between
sanitizers and the installation and export features, but both will work
individually.

Fixes: #16289
2019-01-30 10:28:40 -05:00
Brad King
eff9c69740 Xcode: Place object library artifacts outside Objects-normal directory
The `CONFIGURATION_BUILD_DIR` value in the Xcode project file specifies
where to place the library artifact.  For object libraries we've used
the `Objects-normal` directory to hide away the `.a` that we otherwise
cannot stop Xcode from producing.  The parent of this directory is also
specific to the target and does not vary with Xcode's sanitizer
features, so move the artifact there.

Issue: #16289
2019-01-30 10:28:05 -05:00
Brad King
d685a46f56 Merge topic 'vs-msbuild-arch'
da402a081b VS: Use MSBuild matching toolset host architecture
147d36ce93 Find native build tool after selecting a toolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2876
2019-01-30 08:13:04 -05:00
Brad King
c30f9b1cde Merge topic 'functional-callbacks'
8c92db829b MessageCallback: Remove unused bool& argument
bcee24aecc Use `std::function` for callbacks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: vvs31415 <vstakhovsky@fastmail.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !2872
2019-01-30 08:10:27 -05:00
Brad King
bcec7d0778 Merge topic 'copyfile-stdstring'
c31b6e616d cmSystemTools: copy file member functions accept std::string params

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2877
2019-01-30 08:08:59 -05:00
Brad King
95210d027a macOS: Restore compatibility for setting FRAMEWORK after install()
The `FRAMEWORK` target property affects the way the `install()` command
treats the target and so should be set first.  Our implementation
assumed that this was always the case and led to an assertion failure.
Prior to CMake 3.12 this was visible only when using an explicit
`LIBRARY ... NAMELINK_ONLY` option, but commit 0212d7c762 (install: add
NAMELINK_COMPONENT argument, 2018-04-18, v3.12.0-rc1~139^2~3) made
it possible with a simple `LIBRARY DESTINATION`.

Fully supporting out-of-order specification will require non-trivial
refactoring to defer install generator creation to generate time.
For now simply restore the old behavior of installing the framework
to the library destination and warn about the case.

Fixes: #18848
2019-01-30 08:00:06 -05:00
Kitware Robot
d21769d5dd CMake Nightly Date Stamp 2019-01-30 00:01:07 -05:00
Artur Ryt
d6fbd438c4 Autogen: Refactor std::bind calls to lambdas 2019-01-29 20:51:12 +01:00
Regina Pfeifer
b05b778a2d clang-tidy: Use = delete 2019-01-29 14:09:21 -05:00
Brad King
d75fec5a88 Merge topic 'tidy-use-equals-default'
094f01d0f0 cleanup: Prefer compiler provided special member functions
55671b41d2 clang-tidy: Use `= default`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !2841
2019-01-29 14:07:24 -05:00
Regina Pfeifer
8c92db829b MessageCallback: Remove unused bool& argument 2019-01-29 16:35:53 +01:00
Vitaly Stakhovsky
c31b6e616d cmSystemTools: copy file member functions accept std::string params
Cleaned up `c_str()`s.
`cmSystemTools::CopyFileIfDifferent()` removed as redundant.
2019-01-29 10:34:18 -05:00
Regina Pfeifer
bcee24aecc Use std::function for callbacks 2019-01-29 16:32:52 +01:00
Brad King
9620cb935a Merge topic 'add_consistent_verbose_build_flag'
66801f4d40 cmake: Add tests for verbose output to --build mode
439fe2e253 cmake: Add options for verbose output to --build mode
638667efa2 cmake: cmcmd.cxx fix "The arguments are" comments
3ca4402966 ctest: Fix --build-and-test without --build-target on Xcode
cb6c233ecc cmake: Add -hideShellScriptEnvironment xcodebuild option
1a45266cb5 cmGlobalGenerator: Add a class that represent the build command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2708
2019-01-29 09:19:39 -05:00
Brad King
60c06620a6 Merge topic 'cmoutputconverter-simplify'
b6a957c969 cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2831
2019-01-29 09:18:42 -05:00
Brad King
90ac5e6384 Merge topic 'message-stdstring'
186d9b083d cmSystemTools::Message: Add overload accepting std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2869
2019-01-29 09:17:51 -05:00
Brad King
e7be5638a0 Merge topic 'ftc-string'
2fc69ba0b3 cmFileTimeComparison: use std::string arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2868
2019-01-29 09:16:58 -05:00
Brad King
da402a081b VS: Use MSBuild matching toolset host architecture
VS 2017 and VS 2019 provide `amd64/MSBuild.exe` variants next to
their `MSBuild.exe` tools.  When the 64-bit host toolchain is
selected (e.g. via `host=x64`), select the 64-bit MSBuild too.

Fixes: #18219
2019-01-29 09:11:00 -05:00
Brad King
147d36ce93 Find native build tool after selecting a toolset
This will allow `CMAKE_GENERATOR_TOOLSET` to influence build tool
selection.

For reference, commit f8cb9944a1 (Find native build tool after
determining the target system, 2017-09-26, v3.10.0-rc1~31^2) already
delayed this step from where it was historically.
2019-01-29 09:09:18 -05:00
Brad King
fa7077e741 Merge topic 'vs-host-arch'
0fd742a6ff VS: Teach VS 2019 generator to select host tools matching host arch
17cef3806d VS: Add support for explicit 32-bit toolset selection via host=x86
bf774e521b VS: Remove stray semicolons from VS 2019 implementation
142e67eac6 VS: Use internal abstraction for VCTargetsPath host arch

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2870
2019-01-29 09:05:51 -05:00
Brad King
eeb34232fc Merge topic 'add-missing-macos-framework'
475e78d907 macOS: Add missing explicit dependency on CoreServices framework

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2873
2019-01-29 08:59:59 -05:00
Brad King
bcb1297faf Merge topic 'autogen_reenable_implicit_include_dirs'
03dbb62d31 Autogen: Reenable passing compiler implicit include directories to moc
5f34bdc7f9 cmLocalGenerator: Refactor `GetIncludeDirectoriesImplicit` method
f16dfdf71f cmLocalGenerator: Simplify `GetIncludeDirectories`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2864
2019-01-29 08:59:06 -05:00
Chuck Atkins
475e78d907 macOS: Add missing explicit dependency on CoreServices framework
On Apple, the implementation of cmGlobalXCodeGenerator::Open uses
LSOpenCFURLRef from CoreServices.  This get's transitively pulled in
from CMake's libuv build but ends up generating a linker error when
using an external libuv.  This explicitly adds the appropriate
dependency.
2019-01-29 06:59:24 -05:00
Kitware Robot
62c0b1aebb CMake Nightly Date Stamp 2019-01-29 00:01:06 -05:00
Brad King
0fd742a6ff VS: Teach VS 2019 generator to select host tools matching host arch
This generator is new so we can introduce the long-desired behavior
of selecting ``host=x64`` tools by default on x64 hosts.
2019-01-28 12:58:21 -05:00
Brad King
17cef3806d VS: Add support for explicit 32-bit toolset selection via host=x86
Generalize the ``host=x64`` option in `CMAKE_GENERATOR_TOOLSET`
to also support ``host=x86``.
2019-01-28 11:22:50 -05:00
Brad King
bf774e521b VS: Remove stray semicolons from VS 2019 implementation 2019-01-28 11:22:31 -05:00
Brad King
142e67eac6 VS: Use internal abstraction for VCTargetsPath host arch
Call our internal host architecture lookup method rather than directly
accessing a member used by its implementation.
2019-01-28 11:16:02 -05:00
Florian Maushart
439fe2e253 cmake: Add options for verbose output to --build mode
While we already support `VERBOSE` environment variable and
`CMAKE_VERBOSE_MAKEFILE` cached variable, add `-v` and `--verbose`
command line options to be able to activate verbose output directly from
CMake's build tool mode command line.

Also make `msbuild` honor the verbosity setting. `xcodebuild` still
doesn't honor the verbosity setting as it will need a policy added
and reworking of cmGlobalGenerator and cmsys to support
multiple command invocation.
2019-01-28 09:44:50 -05:00
Vitaly Stakhovsky
186d9b083d cmSystemTools::Message: Add overload accepting std::string 2019-01-28 09:35:51 -05:00
Vitaly Stakhovsky
2fc69ba0b3 cmFileTimeComparison: use std::string arguments 2019-01-28 09:09:59 -05:00
Sebastian Holtermann
03dbb62d31 Autogen: Reenable passing compiler implicit include directories to moc
Since commit 5990ecb741 (Compute implicit include directories from
compiler output, 2018-12-07) we now have compiler implicit include
directory computation for gcc and clang.  It should be safe now to pass
these to `moc`.  This patch re-enables passing the compiler implicit
include directories to `moc`, which was disabled due to issue #18669.

Fixes: #18041
Issue: #18669
2019-01-28 08:41:37 -05:00
Sebastian Holtermann
5f34bdc7f9 cmLocalGenerator: Refactor GetIncludeDirectoriesImplicit method
Use a dedicated `std::set` for implicit include directories instead
of (ab)using the emitted variable.  This in combination with lambdas
makes it easier to comprehend which paths are emitted.

For the implicit include directories we used to omit the
`CMAKE_SYSROOT_COMPILE`/`CMAKE_SYSROOT` prefix.  This has been changed and
the implicit paths are returned prefixed.  Implicit include directory returning
is only ever used by QtAutoGen which requires prefixed paths.  QtAutoGen passes
the (implicit) include paths to the `moc` which isn't aware of
`CMAKE_SYSROOT_COMPILE`/`CMAKE_SYSROOT`.
2019-01-28 08:41:28 -05:00
Sebastian Holtermann
f16dfdf71f cmLocalGenerator: Simplify GetIncludeDirectories
This patch strips the `stripImplicitDirs` and `appendAllImplicitDirs`
parameters from the `cmLocalGenerator::GetIncludeDirectories` method and makes
it a wrapper into the new `cmLocalGenerator::GetIncludeDirectoriesImplicit`
method.  `cmLocalGenerator::GetIncludeDirectoriesImplicit` is the renamed old
implementation of `cmLocalGenerator::GetIncludeDirectories` and still
accepts `stripImplicitDirs` and `appendAllImplicitDirs`.

The motivation is that there's only *one* case where
`cmLocalGenerator::GetIncludeDirectories` is called with the
`stripImplicitDirs` parameter being `false` (QtAutoGen), but many other places
where it is called using the `true` default value.

QtAutoGen is modified to use `cmLocalGenerator::GetIncludeDirectoriesImplicit`
directly.  In two use cases of `cmLocalGenerator::GetIncludeDirectories`
the manually set `true` value for `stripImplicitDirs` is removed.
2019-01-28 08:41:28 -05:00
Brad King
8e495333c0 Merge topic 'cmake-gui-s-b'
ad0853b3d4 QtDialog: Clean up and document -S and -B options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2863
2019-01-28 08:36:58 -05:00
Brad King
a844c7248d Merge topic 'cmake-E-compare_files-eol'
a5098cad94 cmake: Add --ignore-eol option to `-E compare_files` command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2778
2019-01-28 08:27:03 -05:00
Taylor Braun-Jones
a5098cad94 cmake: Add --ignore-eol option to -E compare_files command
Fixes: #13007
2019-01-28 08:24:50 -05:00
Brad King
1593e16d88 Merge topic 'get_filename_component_last_ext'
2a9220c34d Help: Add notes for topic 'get_filename_component_last_ext'
edda30d0f5 Tests: Add tests for LAST_EXT and NAME_WLE
7a25ef326b Help: Add documentation for new get_filename_component components
e50a36df48 cmGetFilenameComponentCommand: Add more components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2853
2019-01-28 08:21:50 -05:00
Brad King
ce57bc8e04 Merge topic 'vs2019'
626c51f47b VS: Update for Visual Studio 2019 Preview 2
fd45cbf40e VS: Fix `/MANIFESTUAC:` link flag mapping for v142
db35e3cfd6 VS: Fix support for '/guard:cf' linker flag for v142
533f95c847 VS: Map the link `/debug` flag for v142
d2fcc6748a VS: Fix `/MANIFESTUAC:NO` link flag mapping for v142
a7973ccb53 VS: Populate `/permissive` flag table entry for v142
049410c0b6 VS: Populate `/JMC-` flag table entry for v142
43aa632f57 VS: Populate `-Qspectre-` flag table entry for v142
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2856
2019-01-28 08:07:28 -05:00
Brad King
70fabb8f25 Merge topic 'png-optimize'
b9e6d04558 Reduce size of PNG images
880e380599 CPack: Replace corrupted background png with original

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2852
2019-01-28 08:04:51 -05:00
Kitware Robot
f832f15509 CMake Nightly Date Stamp 2019-01-28 00:01:05 -05:00
Bruno Manganelli
b6a957c969 cmOutputConverter: move ConvertToRelativePath to cmStateDirectory. 2019-01-27 15:48:57 +00:00
Kitware Robot
f725750f04 CMake Nightly Date Stamp 2019-01-27 00:01:05 -05:00
Kitware Robot
be2cc309f1 CMake Nightly Date Stamp 2019-01-26 00:01:07 -05:00
Kyle Edwards
ad0853b3d4 QtDialog: Clean up and document -S and -B options 2019-01-25 16:23:56 -05:00
Lucy Phipps
b9e6d04558 Reduce size of PNG images
Use FileOptimizer 13.50.2431 (x86) and ZopfliPNG 1.0.2.

Update expected file hashes in tests.
2019-01-25 09:14:51 -05:00
Florian Maushart
638667efa2 cmake: cmcmd.cxx fix "The arguments are" comments
Changed "argv" to "args" in comments to match parameter names
2019-01-25 08:21:14 -05:00
Florian Maushart
3ca4402966 ctest: Fix --build-and-test without --build-target on Xcode 2019-01-25 08:21:13 -05:00
Florian Maushart
cb6c233ecc cmake: Add -hideShellScriptEnvironment xcodebuild option
For CMake's build tool mode add -hideShellScriptEnvironment if version
is XCode 7.0 or above
2019-01-25 08:20:51 -05:00
Robert Maynard
1a45266cb5 cmGlobalGenerator: Add a class that represent the build command
This refactors a std::vector<std::string> into a class so that
we can extend the features to represent things such as multiple
chained commands in the future.
2019-01-25 08:20:02 -05:00
Brad King
40628b2519 Merge topic 'max-recursion-depth'
a6982cff0d cmMakefile: Impose maximum recursion limit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Juraj Oršulić <juraj.orsulic@fer.hr>
Merge-request: !2746
2019-01-25 08:09:37 -05:00
Brad King
24b6e4830d Merge topic 'exclude_from_all'
dc6888573d Pass EXCLUDE_FROM_ALL from directory to targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2816
2019-01-25 08:06:54 -05:00
Brad King
15bc4a25e5 Merge topic 'swift'
de13c55d74 Ninja: support `SWIFT_MODULE_NAME` property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2850
2019-01-25 08:06:01 -05:00
Brad King
a8f5155523 Merge topic 'clang-warnings'
c3203bf316 Silence -Wcomma warning
68eabb3576 Avoid -Wstring-plus-int warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2846
2019-01-25 08:04:19 -05:00
Brad King
b4ccb6cd32 Merge topic 'update-kwsys'
d67ce0a61e Merge branch 'upstream-KWSys' into update-kwsys
bee32e96b3 KWSys 2019-01-24 (b9dd1636)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2851
2019-01-25 08:02:21 -05:00
Brad King
40745ad35a Merge topic 'cmake-files-directory'
3e867ed400 cmake: inlined files dir constant and removed it from cmake.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Rejected-by: vvs31415 <vstakhovsky@fastmail.com>
Merge-request: !2655
2019-01-25 08:01:26 -05:00
Brad King
c18fc30d1a Merge topic 'renamefile-string'
9e5c13738b cmSystemTools::RenameFile: Accepts std::string args

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2842
2019-01-25 08:00:14 -05:00
Brad King
9f84cbd8c3 Merge topic 'error-overloads'
99337d345b cmSystemTools::Error(): new overload accepting std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2845
2019-01-25 07:59:11 -05:00
Brad King
5a6e683a32 Merge topic 'unixmfg3-string'
614876c638 cmLocalUnixMakefileGenerator3: more methods accept std::string

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2840
2019-01-25 07:58:12 -05:00
Brad King
a5f7652fb9 Merge topic 'revert-file-alt-httpauth'
646eedcfcb Revert "file: Allow DOWNLOAD/UPLOAD using alternate authentication methods"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2858
2019-01-25 07:51:25 -05:00
Brad King
29fbd3c9a0 Merge topic 'aarch64-no-std-move-function'
8f56f22b84 cmListCommand: Avoid std::function move constructor on aarch64

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2857
2019-01-25 07:50:23 -05:00
Regina Pfeifer
094f01d0f0 cleanup: Prefer compiler provided special member functions 2019-01-25 06:45:00 -05:00
Regina Pfeifer
55671b41d2 clang-tidy: Use = default
Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and
`Source/cmUVHandlePtr.h` where a few older compilers require a
user-defined default constructor (with `{}`).
2019-01-25 06:44:32 -05:00
Kitware Robot
d47aa71b39 CMake Nightly Date Stamp 2019-01-25 00:01:06 -05:00
Brad King
646eedcfcb Revert "file: Allow DOWNLOAD/UPLOAD using alternate authentication methods"
Revert commit 31301b46a7 (file: Allow DOWNLOAD/UPLOAD using alternate
authentication methods, 2018-08-28, v3.13.0-rc1~155^2).  It regressed
support for password-protected redirects.

Fixes: #18691
2019-01-24 14:14:40 -05:00
Brad King
8f56f22b84 cmListCommand: Avoid std::function move constructor on aarch64
Since commit 5a0784ddea (clang-tidy: Pass by value, 2019-01-21), some of
the `RunCMake.{list,PositionIndependentCode}` cases have crashed on an
aarch64 build with GCC 6.  Avoiding use of the `std::function` move
constructor avoids the crash.  Use a strict preprocessor condition to
use this workaround only where needed.
2019-01-24 14:07:05 -05:00
Brad King
626c51f47b VS: Update for Visual Studio 2019 Preview 2
The toolset is now called `v142`.  Use matching flag tables.

Fixes: #18834
2019-01-24 13:49:25 -05:00
Tushar Maheshwari
e50a36df48 cmGetFilenameComponentCommand: Add more components
LAST_EXT: gets last extension from filename with multiple periods
NAME_WLE: gets the name without the last extension
2019-01-24 22:38:52 +05:30
Brad King
d67ce0a61e Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2019-01-24 (b9dd1636)
2019-01-24 09:52:25 -05:00
Saleem Abdulrasool
de13c55d74 Ninja: support SWIFT_MODULE_NAME property
Add a new `SWIFT_MODULE_NAME` property that defaults to the target name.
This can be adjusted via `set_target_properties`.  This is needed as
otherwise, the first source file determines the module name.

Issue: #18800
2019-01-23 21:21:07 -08:00
Kitware Robot
a578922467 CMake Nightly Date Stamp 2019-01-24 00:01:08 -05:00
Brad King
c3203bf316 Silence -Wcomma warning
We use a comma-in-paren expression to evaluate multiple statements
in a condition.  Clang warns that this may be incorrect.  Follow
its suggestion to cast all but the last expression to `void` to
silence the warning.
2019-01-23 13:20:14 -05:00
Brad King
68eabb3576 Avoid -Wstring-plus-int warning
In `cmState::GetGlobalProperty` we use a macro to produce a string of
the form ";a;b;c" and want to return "a;b;c" by skipping the leading
";".  Switch from pointer arithmetic to indexing+addressing to silence
the "warning: adding 'int' to a string does not append to the string"
diagnostic from Clang.
2019-01-23 13:17:22 -05:00
Vitaly Stakhovsky
99337d345b cmSystemTools::Error(): new overload accepting std::string 2019-01-23 10:19:30 -05:00
Kyle Edwards
a6982cff0d cmMakefile: Impose maximum recursion limit
In order to keep infinitely-recursive scripts from causing a stack
overflow in the CMake executable, CMake now imposes a maximum
recursion limit before issuing an error message. The limit can be
adjusted at runtime with CMAKE_MAXIMUM_RECURSION_DEPTH.

Fixes: #18694
2019-01-23 09:52:29 -05:00
Brad King
a7f5cd45e1 Merge topic 'tidy-pass-by-value'
5a0784ddea clang-tidy: Pass by value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2836
2019-01-23 08:17:49 -05:00
Brad King
22893baed1 Merge topic 'update-kwsys'
405d9cb4b5 Merge branch 'upstream-KWSys' into update-kwsys
3068a0d0dc KWSys 2019-01-22 (4fecfe6f)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2833
2019-01-23 08:17:04 -05:00
Brad King
e898f48bbc Merge topic 'getmodulesfile-string'
2993fc347a cmMakefile: GetModulesFile() accepts std::string param

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2838
2019-01-23 08:16:15 -05:00
Brad King
c1247d861a Merge topic 'cmake_build_jobs_supports_no_space'
f2fca92686 cmake: --build supports '-jN'
e463133cd2 Tests: Remove unused files from RunCMake.CommandLine test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2819
2019-01-23 08:15:36 -05:00
Brad King
d8788faa66 Merge topic 'cmake-warn-no-src-build-dir'
20861d758b Merge branch 'backport-cmake-warn-no-src-build-dir'
68b51fb19a cmake: Convert no source/build dir error to warning
6b85eea365 Help: Add 3.13.4 release note for no source/build dir error/warning
2395b1b244 cmake: Convert no source/build dir error to warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2839
2019-01-23 08:13:02 -05:00
Kitware Robot
fd54b85937 CMake Nightly Date Stamp 2019-01-23 00:01:05 -05:00
Vitaly Stakhovsky
9e5c13738b cmSystemTools::RenameFile: Accepts std::string args 2019-01-22 20:37:59 -05:00
Craig Scott
68b51fb19a cmake: Convert no source/build dir error to warning
Temporarily restore previous behavior that allowed specifying
no source or build directory to work, even though it was
neither documented nor supported. This commit is expected
to eventually be reverted to restore the fatal error for such
cases.

Relates: #18817
2019-01-22 14:46:03 -05:00
Regina Pfeifer
5a0784ddea clang-tidy: Pass by value 2019-01-22 13:03:04 -05:00
Brad King
fa5bf870df Merge topic 'implicit-includes'
5990ecb741 Compute implicit include directories from compiler output
d751d2d2ed CMakeDetermineCompilerABI: set locale to C for try_compile()
c765ae495a CMakeDetermineCompilerABI: pass verbose flag during compilation
8c5221fb1f try_compile: Preserve special characters in COMPILE_DEFINITIONS
15ad830062 Refactor exclusion of -I/usr/include to avoid per-language values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2716
2019-01-22 11:37:49 -05:00
Brad King
a1f65014a3 Merge topic 'help-mark-default-generator'
dfd5ae7da7 Help: Mark default CMake generator with asterisk
6023fe7ff2 ccmake: Append rather than replace Generators section of docs
7408cd3929 cmake: Return generator docs directly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2682
2019-01-22 11:37:01 -05:00
Brad King
405d9cb4b5 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2019-01-22 (4fecfe6f)
2019-01-22 11:29:56 -05:00
Vitaly Stakhovsky
614876c638 cmLocalUnixMakefileGenerator3: more methods accept std::string 2019-01-22 11:11:13 -05:00
Brad King
bcc9ea2b3d Merge topic 'crosscompiling_emulator-fix'
ab3b549ee0 CROSSCOMPILING_EMULATOR: Fix test generation for empty value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2834
2019-01-22 09:41:23 -05:00
Brad King
4b017d579d Merge topic 'Wcomma'
5ff7fb592e Fixed all but one clang -Wcomma warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2828
2019-01-22 09:38:30 -05:00
Brad King
cb7fbf1dbb Merge topic 'stdout-string'
3132ea801c cmSystemTools: Stdout(),Stderr() accept std::string argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2829
2019-01-22 09:32:58 -05:00
Brad King
acaf9801d0 Merge topic 'depends-string'
2c50a72576 cmDepends: all members accept std::string arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2827
2019-01-22 09:32:06 -05:00
Brad King
17e12a9fa9 Merge topic 'cmake-gui-generator-platform'
67bced8a26 cmake-gui: Improve label for default platform
48ec0bc140 cmake-gui: Add field for generator platform selection
8bba458ea5 Add global generator factory method to get default platform name
818df52c48 Add global generator factory method to get list of known platforms
8144b00e32 Split global generator factory list with and without platforms
b70c0aed5c VS: Factor out helper function to compute host platform name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2832
2019-01-22 09:28:18 -05:00
Robert Maynard
f2fca92686 cmake: --build supports '-jN' 2019-01-22 08:27:04 -05:00
Kitware Robot
05e4fa4773 CMake Nightly Date Stamp 2019-01-22 00:01:06 -05:00
Vitaly Stakhovsky
2993fc347a cmMakefile: GetModulesFile() accepts std::string param 2019-01-21 12:56:51 -05:00
Zack Galbreath
dc6888573d Pass EXCLUDE_FROM_ALL from directory to targets
When a target is created it now inherits the EXCLUDE_FROM_ALL property
from its directory. This change makes it possible to include a target
in "all", even if its directory has been marked as EXCLUDE_FROM_ALL.
2019-01-21 11:38:24 -05:00
Brad King
8c5221fb1f try_compile: Preserve special characters in COMPILE_DEFINITIONS
When generating the `CMakeLists.txt` file, we pass the values given
to our `COMPILE_DEFINITIONS` option in an `add_definitions` call.
Pass them as bracket arguments to preserve special characters
like `#`.
2019-01-21 11:14:08 -05:00
Brad King
15ad830062 Refactor exclusion of -I/usr/include to avoid per-language values
Add a `CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES` to contain the
hard-coded list of paths to be excluded from `-I` arguments so that the
values remain excluded even if the per-language
`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` variants change.

This is needed to preserve our historical exclusion of `-I/usr/include`
even when it is not a real implicit include directory.  A policy may be
needed to remove it later.
2019-01-21 11:14:07 -05:00
Bruno Manganelli
3e867ed400 cmake: inlined files dir constant and removed it from cmake.h 2019-01-21 15:34:16 +00:00
Kyle Edwards
ab3b549ee0 CROSSCOMPILING_EMULATOR: Fix test generation for empty value
If CROSSCOMPILING_EMULATOR was set to an empty string, and a test
was generated with the executable as the command, CMake would segfault
upon trying to generate the test file. Fix this.

Fixes: #18819
2019-01-21 09:57:25 -05:00
Brad King
c7428e1729 Merge topic 'read-list-file'
25caf7bafe cmMakefile::ReadListFile() accepts std::string argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2821
2019-01-21 07:57:33 -05:00
Brad King
177b5fb61b Merge topic 'fortran-compiler-id'
a080914274 Fortran: Add compiler ID/Version generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2804
2019-01-21 07:56:59 -05:00
Brad King
eadaf0c8c3 Merge topic 'cmake-role-fix'
264bdac185 CMAKE_ROLE: Fix value for ctest --build-and-test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2820
2019-01-21 07:54:06 -05:00
Brad King
1fba410ecf Merge topic 'autogen_mocs_compilation_first'
1ed4d48dcf Autogen: Prepend instead of append `mocs_compilation.cpp` to the sources list
a42b700cc2 cmTarget,cmGeneratorTarget: Add optional `before` parameter to AddSource

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Peter Wu <peter@lekensteyn.nl>
Merge-request: !2815
2019-01-21 07:53:23 -05:00
Brad King
9ea2f0eb94 Merge topic 'swift-module-name'
0ffe8f8844 Ninja: support `SWIFT_MODULE_NAME` property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2813
2019-01-21 07:52:40 -05:00
Brad King
4dba5d6ce2 Merge topic 'use-emplace'
ef61997b1b clang-tidy: Use emplace
2e5307a2a4 CTestSVN: Accept std::string in SVNInfo constructor

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2811
2019-01-21 07:51:54 -05:00
Brad King
7e5f9b192e Merge topic 'ctest-json-polish'
cae9d2a61a CTest: Teach --show-only= to reject unknown values
7370b02c36 CTest: Teach --show-only=json-v1 to filter out not-available tests
62fec84ad7 Tests: Fix RunCMake.CTestCommandLine case when no python is found
75a7a23746 Tests: Rename RunCMake.CTestCommandLine show-only test cases
fecbc87608 Tests: Fix RunCMake.CTestCommandLine to actually check json-v1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2812
2019-01-21 07:51:08 -05:00
Brad King
d704cc3407 Merge topic 'command_file_link'
0f08ed8936 cmSystemTools: Silence CreateLink and CreateSymlink errors
593d986470 Tests: Avoid cross-device links in CREATE_LINK test
9a3d85cfc5 Tests: Skip symlink tests on Windows
e68ea269d7 Tests: CREATE_LINK subcommand negative test case
45aa9c65a1 Tests: file CREATE_LINK subcommand test cases
8bb7562f1a Help: Add documentation for file(CREATE_LINK) subcommand
81650e488c cmFileCommand: Add CREATE_LINK subcommand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2759
2019-01-21 07:48:26 -05:00
Brad King
d1aa2e1109 Merge topic 'find-package-resolve-symlinks'
b773e58099 find_package: add test coverage for CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
a5e948a36f find_package: optionally resolve symlinks when discovering packages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2798
2019-01-21 07:47:29 -05:00
Brad King
fefae527c8 Merge topic 'submit-url'
2915a75615 CTest: Add documentation and release notes for SubmitURL
d6475daa79 Modules/CTest: Set SubmitURL
938f06fda6 ctest_submit: Add parameter SUBMIT_URL
65e725c957 CTest: Add option SubmitURL
65f1fc9d63 CTest: Add function GetSubmitURL
2bedd5fb7c ctest_submit: Remove submit method from log output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2719
2019-01-21 07:46:20 -05:00
Julien Jomier
67bced8a26 cmake-gui: Improve label for default platform
Specify the default platform to be used when the platform field is empty
2019-01-21 13:18:26 +01:00
Kitware Robot
7ac3844ab5 CMake Nightly Date Stamp 2019-01-21 00:01:06 -05:00
Vitaly Stakhovsky
3132ea801c cmSystemTools: Stdout(),Stderr() accept std::string argument 2019-01-20 00:03:35 -05:00
Kitware Robot
41e02ea3b8 CMake Nightly Date Stamp 2019-01-20 00:01:04 -05:00
Kitware Robot
c902e775ec CMake Nightly Date Stamp 2019-01-19 00:01:07 -05:00
Vitaly Stakhovsky
2c50a72576 cmDepends: all members accept std::string arguments
Most `const char*` arguments converted to `const std::string&`
in `cmDepends` and derived classes.
In addition performed minor code cleanup.
2019-01-18 20:30:13 -05:00
Artur Ryt
dfd5ae7da7 Help: Mark default CMake generator with asterisk
Required extracting default generator evaluation
to explicit function, as Visual Studio generators
get validated during their construction.

Fixes: #18544
2019-01-18 12:57:34 -05:00
Craig Scott
6023fe7ff2 ccmake: Append rather than replace Generators section of docs
Using SetSection() discards the heading line populated by
addCMakeStandardDocSections(), whereas AppendSection()
preserves it. This also makes the code used for ccmake
consistent with that used for cmake and cmake-gui.
2019-01-18 12:57:34 -05:00
Artur Ryt
7408cd3929 cmake: Return generator docs directly
The GetGeneratorDocumentation() function was not accurately
named and required the vector to populate to be passed as a
function argument. This commit makes the slightly renamed
function return by value, making it a true getter as implied
by its name. Some minor refactoring of the implementation
also makes the steps of populating the vector clearer.
2019-01-18 12:57:32 -05:00
Julien Jomier
48ec0bc140 cmake-gui: Add field for generator platform selection
Extend the "first configure" dialog with a field for the user to select
a value for `CMAKE_GENERATOR_PLATFORM`.

Fixes: #17343
2019-01-18 12:41:35 -05:00
Brad King
8bba458ea5 Add global generator factory method to get default platform name 2019-01-18 12:30:19 -05:00
Brad King
818df52c48 Add global generator factory method to get list of known platforms
Add a `cmGlobalGeneratorFactory::GetKnownPlatforms` method to return
a list of known possible values for `CMAKE_GENERATOR_PLATFORM`.
Implement the method for each generator by referencing the list of
possible values documented in `Help/generator/*.rst` for it.

Co-Author: Julien Jomier <julien.jomier@kitware.com>
2019-01-18 12:29:53 -05:00
Brad King
8144b00e32 Split global generator factory list with and without platforms
Replace `cmGlobalGeneratorFactory::GetGenerators` with a pair of methods
to split the list of generator names into those that have platforms in
the name and those that do not.
2019-01-18 12:29:53 -05:00
Brad King
b70c0aed5c VS: Factor out helper function to compute host platform name 2019-01-18 12:29:53 -05:00
Kyle Edwards
264bdac185 CMAKE_ROLE: Fix value for ctest --build-and-test
--build-and-test builds a CMake project, so CMAKE_ROLE should be
PROJECT. Fix this and add a test case.
2019-01-18 10:15:25 -05:00
Andrew Paprocki
a080914274 Fortran: Add compiler ID/Version generator expressions
Adds `Fortran_COMPILER_ID` and `Fortran_COMPILER_VERSION` generator
expression support to match equivalent `C_COMPILER_ID`,
`CXX_COMPILER_ID`, `C_COMPILER_VERSION`, and `CXX_COMPILER_VERSION`
support.

This is very helpful in the case where the C/C++ compiler suite is a
different type of compiler from the platform Fortran compiler and
projects use generator expressions to assign compiler flags and
definitions.  (e.g. `GNU` C/C++ and `SunPro` Fortran on Linux)
2019-01-18 08:56:13 -05:00
Saleem Abdulrasool
0ffe8f8844 Ninja: support SWIFT_MODULE_NAME property
Add a new `SWIFT_MODULE_NAME` property that defaults to the target name.
This is needed as otherwise, the first source file determines the module
name.

Issue: #18800
2019-01-18 07:52:17 -05:00
Sebastian Holtermann
1ed4d48dcf Autogen: Prepend instead of append mocs_compilation.cpp to the sources list
`mocs_compilation.cpp` easily takes a long time to compile when it
contains multiple `moc` files.  When it was appended like before
we ran into the situation that all smaller sources were already compiled when
`mocs_compilation.cpp` got compiled at last.  In that case a single core was
busy but all remaining cores stayed idle.

To optimize CPU core utilization we now prepend `mocs_compilation.cpp`
to the sources list instead of appending it.  This allows smaller source files
to get compiled *while* the long lasting `mocs_compilation.cpp` gets compiled.

Closes #18793
2019-01-18 13:47:23 +01:00
Sebastian Holtermann
a42b700cc2 cmTarget,cmGeneratorTarget: Add optional before parameter to AddSource
The new optional `before` parameter in `cmTarget::AddSource` and
`cmGeneratorTarget::AddSource` allows to prepend a source file
to the sources list instead of appending it.
2019-01-18 13:47:23 +01:00
Brad King
65a3abf999 Merge topic 'GHS_updates'
21ab58d3f8 GHS: Update test suite
72e0c115b7 GHS: Add Compiler ID detection
436cc5e991 GHS: try_compile() now uses GHS platform variables
4a1ec0de3d GHS: Fix toolset selection
1a66acdef2 GHS: Append ".gpj" to target name when generating build command
0c9e47d7cd GHS: Integrity Application updates
8044318431 GHS: Add support for some of the source file properties
73092b2213 GHS: Add support for object libraries
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2231
2019-01-18 06:58:35 -05:00
Kitware Robot
92d132100a CMake Nightly Date Stamp 2019-01-18 00:01:05 -05:00
Regina Pfeifer
ef61997b1b clang-tidy: Use emplace 2019-01-17 13:12:02 -05:00
Vitaly Stakhovsky
25caf7bafe cmMakefile::ReadListFile() accepts std::string argument
Same for cmMakefile::ReadDependentFile(); some cleanup
2019-01-17 12:36:07 -05:00
Brad King
cae9d2a61a CTest: Teach --show-only= to reject unknown values 2019-01-17 12:01:07 -05:00
Brad King
7370b02c36 CTest: Teach --show-only=json-v1 to filter out not-available tests
Avoid exposing the internal special value that we use to track tests not
available in the tested configuration.  This also prevents clients from
having to do the filtering themselves.
2019-01-17 12:01:07 -05:00
Brad King
2e5307a2a4 CTestSVN: Accept std::string in SVNInfo constructor 2019-01-17 11:43:56 -05:00
Brad King
68e20f674a Merge topic 'cmake_role-global-property'
4568d046c4 Properties: Add CMAKE_ROLE global property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2805
2019-01-17 11:43:09 -05:00
Brad King
bd3685b6cf Merge topic 'vs-debug-utility-targets'
22b43b0009 VS: Add support for VS_DEBUGGER_* properties on custom targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2794
2019-01-17 11:07:11 -05:00
Brad King
9e3e93fc6f Merge topic 'fix_csharp_defines'
a541d113e6 VS: Honor target_compile_definitions for C# projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2809
2019-01-17 11:06:04 -05:00
Kyle Edwards
4568d046c4 Properties: Add CMAKE_ROLE global property
This property allows scripts to determine whether they're in project
mode, script mode, find-package mode, CTest, or CPack.
2019-01-17 09:44:29 -05:00
Kitware Robot
c144db1b8c CMake Nightly Date Stamp 2019-01-17 00:01:06 -05:00
Fred Baksik
21ab58d3f8 GHS: Update test suite
-- Allow for testing default toolset settings
   If CMake_TEST_GreenHillsMULTI_config is not defined then
   just run the GHS tests using defaults.
-- Handle paths that contain spaces
-- Update test suite to use "-non_shared" linker option
   Fixes linking issue if GHS is not shipped with shared libraries
-- Other minor cleanup
2019-01-16 10:42:08 -05:00
Fred Baksik
72e0c115b7 GHS: Add Compiler ID detection
-- Detect GHS compiler and version
   Detect ARCHITECTURE_ID for PPC / ARM / 86 targets
   Detect PLATFORM_ID for Integrity and Integrity178 platforms
   Using defines specified in the documents for the compilers: 201416 PPC / 201754 ARM / 201714 86
-- Fallback C/CXX compiler ID to GHS if not otherwise detected and using GHS MULTI generator
   Works around issue with some GHS compilers not setting __ghs__ compiler define
-- Tweak Compiler ID checking so major id of 002017 is not replaced with 217
-- Prefer try_compile() library targets when testing for working GHS compilers
-- Avoid CMake errors if reading past end of file for checking if file is PE executable
2019-01-16 10:42:04 -05:00