Commit Graph

7597 Commits

Author SHA1 Message Date
Ruslan Baratov
7393418844 Rename CMAKE_GCC_{AR,RANLIB} to CMAKE_LANG_COMPILER_{AR,RANLIB}
The variables recently added by commit b9d36826 (Add 'CMAKE_GCC_AR' and
'CMAKE_GCC_RANLIB' variables, 2017-03-08) are more appropriately managed
with language-specific names rather than toolchain-specific names.
2017-04-03 14:10:50 -04:00
Brad King
585f94fe69 Merge branch 'mac-implicit-link-no-lto-flag' into release 2017-04-03 13:24:03 -04:00
Brad King
53f17333f8 CMakeParseImplicitLinkInfo: Ignore ld -lto_library flag
The `ld` tool in Xcode 8.3 now has a `-lto_library <path>` flag.  Ignore
the flag instead of accidentally parsing it as `-l` with `to_library`.

Fixes: #16766
2017-04-03 13:23:31 -04:00
Brad King
8bc545c24c Merge topic 'ExternalProject-fix-remote-branch'
6f3838c0 ExternalProject: Fix regression in GIT_TAG with remote branch name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !649
2017-04-03 09:26:53 -04:00
Brad King
7c93f6f21d Merge topic 'intel-compile-features'
4af0c9da Features: Update features for Intel C++ 17.0.2 on UNIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !652
2017-04-03 09:25:04 -04:00
Brad King
b1f35f1ffd Merge branch 'intel-compile-features' into release 2017-03-31 14:29:25 -04:00
Brad King
4af0c9daf4 Features: Update features for Intel C++ 17.0.2 on UNIX
Intel 17.0.2 on UNIX introduced a regression from 17.0.1 in its
definition of `__cpp_constexpr` in `-std=c++14` mode.  It incorrectly
defines it as `200704` instead of the expected `201304`.  Fix our
feature detection table to account for this.
2017-03-31 14:29:18 -04:00
Brad King
6f3838c034 ExternalProject: Fix regression in GIT_TAG with remote branch name
The change in commit  v3.8.0-rc2~7^2 (ExternalProject: Run `git
checkout` with `--` to clarify arguments, 2017-02-24) broke the case of
`GIT_TAG some-remote-branch` because an explicit `--` means that the
preceding argument is a tree-ish instead of a branch.  Revert the change
and leave a comment.

Fixes: #16763
2017-03-31 12:59:53 -04:00
Brad King
a122190509 Xcode: Detect CURRENT_ARCH for use by generator
During compiler identification, extract the Xcode `CURRENT_ARCH` value
and save it for later use by the Xcode generator in an internal compiler
information variable.  This will be useful to know the locations of
object files when only one architecture is built.
2017-03-31 11:26:08 -04:00
Brad King
8772fc81c4 Merge topic 'ipo-policy-CMP0069'
dfa8263f Implement interprocedural optimization for GNU compilers
1588a577 Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION
a7575700 Refactoring: s,GetFeatureAsBool,IsIPOEnabled,
e05835c3 CheckIPOSupported: Visual Studio and Xcode generators do not support IPO

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Nils Gladitz <nilsgladitz@gmail.com>
Merge-request: !568
2017-03-31 10:38:08 -04:00
Ruslan Baratov
dfa8263f4b Implement interprocedural optimization for GNU compilers
Honor the `INTERPROCEDURAL_OPTIMIZATION` target property for GNU
compilers by activating their link-time-optimization (LTO) flags.
2017-03-30 14:56:52 -04:00
Ruslan Baratov
1588a577d1 Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION
Previously the `INTERPROCEDURAL_OPTIMIZATION` target property was
honored only for the Intel compiler on Linux and otherwise ignored.  In
order to add support for more compilers incrementally without changing
behavior in the future, add a new policy whose NEW behavior enforces the
`INTERPROCEDURAL_OPTIMIZATION` property.  Add flags for supported
compilers and otherwise produce an error.
2017-03-30 14:56:46 -04:00
Ruslan Baratov
e05835c35b CheckIPOSupported: Visual Studio and Xcode generators do not support IPO 2017-03-30 10:16:10 -04:00
Brad King
cb0f3cbb8e Merge topic '10749-aix-version'
01a8a201 AIX: Properly detect host system version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !645
2017-03-30 09:05:06 -04:00
Brad King
a820327d1a Merge topic 'sdcc-compiler-id'
5695558f SDCC: Fix identification of current sdcc compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !644
2017-03-30 08:59:05 -04:00
Brad King
7a6ab42f47 Merge topic 'FindBoost-1.64-deps'
556d98da FindBoost: Update 1.64 dependencies using 1.64 beta1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !629
2017-03-30 08:55:19 -04:00
Brad King
18eeed4194 Merge branch 'FindBoost-1.64-deps' into release 2017-03-30 08:55:01 -04:00
Brad King
7bb8b38cce Merge topic '16742-swift-3.0'
77139e32 Swift: Simplify mixed test case to make it version agnostic
c03141c0 Swift: Default to Swift 3.0 with Xcode 8.3 and later

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !638
2017-03-30 08:52:37 -04:00
Roger Leigh
556d98da3b FindBoost: Update 1.64 dependencies using 1.64 beta1 2017-03-30 11:43:13 +01:00
Gregor Jasny
01a8a201a7 AIX: Properly detect host system version
CMakeDetermineSystem.cmake uses "uname -r" to get
CMAKE_HOST_SYSTEM_VERSION on AIX. AIX uses "uname -v" for the
major version and "uname -r" for the minor version.

Thanks to Chris Taylor for the suggested patch.

Closes #10749
2017-03-29 21:20:23 +02:00
Brad King
cb4e731347 Merge branch 'sdcc-compiler-id' into release 2017-03-29 13:22:06 -04:00
Brad King
5695558f4a SDCC: Fix identification of current sdcc compiler
The sdcc compiler no longer defines the `SDCC` preprocessor macro.
Instead `__SDCC_VERSION_MAJOR` and similar component-wise macros are
defined.  Use them instead if defined.

Issue: #16746
2017-03-29 13:21:49 -04:00
Brad King
6ca509e7c6 Merge branch '16742-swift-3.0' into release 2017-03-29 10:40:59 -04:00
Brad King
d4a995750a Merge branch 'vs-rc-defines' into release 2017-03-29 09:24:29 -04:00
Brad King
6dc7262bf7 Merge topic 'vs-rc-defines'
fff34934 MSVC: Restore _DEBUG preprocessor definition in RC debug builds
79a91538 RC: Add missing CMAKE_RC_FLAGS_<CONFIG> entries to cache
c77194ec VS: Honor preprocessor definitions in RC flags
1449f6f6 cmVisualStudio10TargetGenerator: De-duplicate preprocessor defs
8a619e8c cmIDEOptions: Add GetDefines method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !640
2017-03-29 09:14:54 -04:00
Roger Leigh
862482df27 FindBoost: Support prebuilt Windows binaries from SourceForge
This are searched for in the default installed location
C:/local/boost_${ver}
2017-03-29 11:27:43 +01:00
Roger Leigh
3ca6f70f8b FindBoost: Allow testing for multiple compiler suffixes
This is to permit VS2017 to make use of the vc141 suffix or
fall back to the compatible vc140 to use Boost libraries built
with VS2015.

Fixes: #16631
2017-03-29 11:27:43 +01:00
Gregor Jasny
c03141c04c Swift: Default to Swift 3.0 with Xcode 8.3 and later
Xcode 8.3 has dropped support for Swift 2.3 so that compiler and
feature detection failed.

Closes #16742
2017-03-28 16:06:29 -04:00
Brad King
fff34934e7 MSVC: Restore _DEBUG preprocessor definition in RC debug builds
In commit v3.8.0-rc1~304^2 (MSVC: Do not define _DEBUG explicitly when
using /MDd, 2016-11-15) we removed the `_DEBUG` preprocessor definition
from MSVC C and C++ flags because the `cl` compiler automatically
defines it in Debug builds anyway.  However, the VS generators propagate
C preprocessor definitions to the RC (Windows Resource Compiler) tool.
This means that we used to explicitly define `_DEBUG` for RC debug
builds.  Therefore existing project code may expect the definition to be
there even though the `rc` compiler itself does not implicitly define
`_DEBUG` in debug builds.

Add the `_DEBUG` flag to the default `CMAKE_RC_FLAGS_DEBUG` instead
to restore this definition for RC debug builds.  This also makes it
available consistently in VS, Ninja, and Makefile generators.

Fixes: #16745
2017-03-28 13:10:56 -04:00
Brad King
79a915383f RC: Add missing CMAKE_RC_FLAGS_<CONFIG> entries to cache 2017-03-28 13:10:55 -04:00
Brad King
83199f8daf Merge topic 'InstallRequiredSystemLibraries-vs2017'
6eb609fd InstallRequiredSystemLibraries: Find VS 2017 redist directory
cf784d9f Add undocumented CMake language means to find VS 2017
082c0375 InstallRequiredSystemLibraries: Split VS 2017 search paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !632
2017-03-28 10:14:59 -04:00
Brad King
3ed87b7ee1 Merge branch 'InstallRequiredSystemLibraries-vs2017' into release 2017-03-27 11:50:36 -04:00
Brad King
6eb609fd59 InstallRequiredSystemLibraries: Find VS 2017 redist directory
Use our undocumented `cmake_host_system_information` query to find the
VS 2017 installation directory by asking the VS installer tool.  Then
look relative to that for the redist directory.

Fixes: #16737
2017-03-27 11:43:01 -04:00
Brad King
082c0375d9 InstallRequiredSystemLibraries: Split VS 2017 search paths
VS 2017 does not have the same registry entries or other paths we
search for other VS versions.  Split the search code paths to treat
it separately.
2017-03-27 11:43:01 -04:00
Brad King
89e2c92f54 Merge topic 'cpack-rpm-debuginfo-honor-package-filename'
f237f5f8 CPack/RPM: support for debuginfo package renaming
6c09c5d6 CPack/RPM honor package file name on debuginfo enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !620
2017-03-27 09:13:31 -04:00
Brad King
ba3798555d Merge topic 'cpack-rpm-debuginfo-docs-cleanup'
1e0fc685 CPack/RPM can now generate a single debuginfo package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !630
2017-03-27 09:02:41 -04:00
Domen Vrankar
1e0fc68501 CPack/RPM can now generate a single debuginfo package
CMake 3.8 introduced possibility of
generating a single debuginfo package
even if component packaging is enabled
so this note no longer applies.
2017-03-27 08:57:33 -04:00
Domen Vrankar
f237f5f851 CPack/RPM: support for debuginfo package renaming 2017-03-25 15:25:55 +01:00
Domen Vrankar
6c09c5d64c CPack/RPM honor package file name on debuginfo enabled
Packages with debuginfo enabled should
still honor defined package file name
if file name is not set to RPM-DEFAULT.

Fixes #16715
2017-03-24 19:52:02 +01:00
Brad King
8b25d8e23c Merge topic 'cpack-rpm-correct-error-message-debug-lengths'
8dc23a43 CPack/RPM: fix error message associated with source path length

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Domen Vrankar <domen.vrankar@gmail.com>
Merge-request: !614
2017-03-24 08:23:15 -04:00
Brad King
1898f7c7d3 Merge topic 'InstallRequiredSystemLibraries-vs2017'
d4a693a0 InstallRequiredSystemLibraries: Add support for VS 2017
5ed4e481 InstallRequiredSystemLibraries: Split MFC redist dir variable
dbdb880a InstallRequiredSystemLibraries: Split VS IDE and DLL versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !616
2017-03-24 08:21:57 -04:00
Brad King
1adbe223cd Merge branch 'cpack-rpm-correct-error-message-debug-lengths' into release 2017-03-23 13:48:17 -04:00
Daniel Black
8dc23a4380 CPack/RPM: fix error message associated with source path length 2017-03-23 13:47:58 -04:00
Brad King
40cf5e0e07 Merge branch 'InstallRequiredSystemLibraries-vs2017' into release 2017-03-23 10:43:00 -04:00
Brad King
d4a693a083 InstallRequiredSystemLibraries: Add support for VS 2017
VS 2017 (VS 15) places its redist DLLs in `Microsoft.VC150.*`
directories but still uses version number `140` in the DLL names.  The
redist directories now have version numbers in their name, and the MSVC
and MFC runtime DLLs may be in directories with different versions.
Fill out our logic to handle this.

For now assume we are given the `MSVC_REDIST_DIR` value as a cache
entry.  Unfortunately we cannot yet find the VS 2017 MSVC redist
directory automatically since there is no registry entry for the VS
installation.  Later we will have to use `cmVSSetupHelper` for this.

Issue: #16735
2017-03-23 10:30:14 -04:00
Brad King
5ed4e48128 InstallRequiredSystemLibraries: Split MFC redist dir variable 2017-03-23 10:26:52 -04:00
Brad King
dbdb880af9 InstallRequiredSystemLibraries: Split VS IDE and DLL versions
Refactor MSVC logic to split the IDE and DLL version variables.
2017-03-23 10:14:50 -04:00
Brad King
f673623130 Merge topic 'InstallRequiredSystemLibraries-refactor'
a2aad448 InstallRequiredSystemLibraries: Drop version from variable names
16eb58d5 InstallRequiredSystemLibraries: Refactor to avoid macros
a259e8db InstallRequiredSystemLibraries: Use `MSVC_VERSION` instead of `MSVC##`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !612
2017-03-23 08:46:04 -04:00
Brad King
cfa55fd428 Merge topic 'doc-prefer-MSVC_VERSION'
fecf8467 Help: Document preference of `MSVC_VERSION` over `MSVC##`
712452e3 Help: Clarify MSVC14 docs w.r.t. VS 2017 v141 toolset
49a60b70 MSVC: Exclude future cl 20+ from MSVC14 variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !609
2017-03-23 08:44:58 -04:00
Brad King
a1440504ff Merge topic 'avoid-MSVC-per-version-vars'
9ab966a7 FindRuby: Use `MSVC_VERSION` instead of `MSVC##`
69b9fde1 FindGTK2: Use `MSVC_VERSION` instead of `MSVC##`
3fe31822 FindBoost: Avoid mentioning discouraged `MSVC##`` variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !610
2017-03-23 08:44:22 -04:00