Commit Graph

29763 Commits

Author SHA1 Message Date
Brad King d80161b08c Merge topic 'vs-win10-sdk'
3f077996 VS: Add support for selecting the Windows 10 SDK (#15670)
5dfc4c5f VS: Add hook to initialize Windows platform settings
61c472a2 cmSystemTools: Add VersionCompareGreater helper
2015-10-02 09:58:17 -04:00
Brad King 8f545d9501 Merge topic 'explicit-system-version'
b31ac171 Allow CMAKE_SYSTEM_VERSION to be set without CMAKE_SYSTEM_NAME
70688609 Help: Improve CMAKE_SYSTEM_{NAME,VERSION} variable documentation
2015-10-02 09:58:15 -04:00
Gilles Khouzam 3f077996f5 VS: Add support for selecting the Windows 10 SDK (#15670)
Teach the VS 2015 generator to produce a WindowsTargetPlatformVersion
value.  Use the CMAKE_SYSTEM_VERSION to specify the version and if not
set choose a default based on available SDKs.  Activate this behavior
when targeting Windows 10.

Co-Author: Brad King <brad.king@kitware.com>
2015-10-02 09:53:25 -04:00
Gilles Khouzam b31ac171a4 Allow CMAKE_SYSTEM_VERSION to be set without CMAKE_SYSTEM_NAME
Teach CMakeDetermineSystem to check for a CMAKE_SYSTEM_VERSION setting
even when CMAKE_SYSTEM_NAME is not set.  This will allow builds on the
host OS to target other versions of the OS without full cross-compiling.
2015-10-02 09:43:24 -04:00
Gilles Khouzam 5dfc4c5f50 VS: Add hook to initialize Windows platform settings
Give VS 10+ generators a chance to choose Windows platform settings just
as they already can for WindowsCE, WindowsStore, and WindowsPhone.
2015-10-02 09:43:24 -04:00
Gilles Khouzam 61c472a287 cmSystemTools: Add VersionCompareGreater helper
Wrap a call to VersionCompare with OP_GREATER in a signature suitable
for use with std::sort.
2015-10-02 09:43:24 -04:00
Brad King 7068860941 Help: Improve CMAKE_SYSTEM_{NAME,VERSION} variable documentation
Specify their meaning for host builds and when cross compiling.
Sepcify their relationship in each case.
2015-10-02 09:42:28 -04:00
Kitware Robot 02bc311138 CMake Nightly Date Stamp 2015-10-02 00:01:06 -04:00
Brad King 59202e17ff Merge topic 'compiler-links-statically'
8b4873a1 Disable shared library support when compiler links statically
e90f463a Drop executable symbol export if platform does not support shared libs
2015-10-01 11:02:38 -04:00
Brad King 5303c187b1 Merge topic 'fix-warnings'
f90acf52 cmVisualStudio10TargetGenerator: Fix unsigned integer constant type
e67e0155 cmMakefile: Avoid name conflict with Solaris global typedef
2015-10-01 11:02:34 -04:00
Kitware Robot ab99010a34 CMake Nightly Date Stamp 2015-10-01 00:01:06 -04:00
Brad King 8b4873a1b0 Disable shared library support when compiler links statically
When a user or a compiler wrapper adds '-static' to the compiler flags
then it will always link static binaries.  Detect this from the compiler
id binary and disable TARGET_SUPPORTS_SHARED_LIBS.  This will prevent
projects from accidentally adding shared libraries when the toolchain
does not support them.  It also helps CMake avoid linking with flags
that require shared libraries to be supported.
2015-09-30 15:01:23 -04:00
Chuck Atkins e90f463a31 Drop executable symbol export if platform does not support shared libs
Instead of always adding CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS to
executables, or just when the ENABLE_EXPORTS property is set (CMP0065),
make sure that the target platform also actually supports shared
libraries.  If not, then the executable cannot possibly provide symbols
to them anyway.
2015-09-30 14:59:11 -04:00
Brad King 5c50b39686 Merge topic 'FindOpenSSL-imported-targets'
0429c384 Help: Add notes for topic 'FindOpenSSL-imported-targets'
2015-09-30 09:43:40 -04:00
Brad King 2cf71cbdf6 Merge topic 'update-kwsys'
def90d5f Merge branch 'upstream-kwsys' into update-kwsys
cc144ebf KWSys 2015-09-28 (2089567a)
2015-09-30 09:43:37 -04:00
Brad King f90acf522b cmVisualStudio10TargetGenerator: Fix unsigned integer constant type
Add a 'u' suffix to FILETIME component integer constant initializers.
This avoids warnings about the range of the signed constant value.
2015-09-30 08:53:09 -04:00
Brad King e67e0155d9 cmMakefile: Avoid name conflict with Solaris global typedef
On Solaris there is a global typedef called 'single':

 /usr/include/floatingpoint.h:77:15: note: shadowed declaration is here
  typedef float single;

Avoid shadowing it by using a different name.
2015-09-30 08:47:02 -04:00
Kitware Robot 11733d2dae CMake Nightly Date Stamp 2015-09-30 00:01:05 -04:00
Konstantin Podsvirov 0429c3843d Help: Add notes for topic 'FindOpenSSL-imported-targets' 2015-09-29 11:07:49 -04:00
Brad King def90d5fa5 Merge branch 'upstream-kwsys' into update-kwsys 2015-09-29 10:10:03 -04:00
KWSys Robot cc144ebfd8 KWSys 2015-09-28 (2089567a)
Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ 2089567a | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' dc4e4a55..2089567a
Vitaly Baranov (1):
      2089567a SystemTools: Fix GetPath to not affect existing output vector entries
2015-09-29 10:09:57 -04:00
Brad King f23ab1a150 Merge topic 'vs-old-rule-files'
fa5284f0 VS: Prevent generated "rule" files from causing rebuilds
2015-09-29 10:08:15 -04:00
Brad King 130f116340 Merge topic 'fix-qtautogen-with-object-library-Ninja'
9bc6eb8e cmGlobalGenerator: Initialize generator targets on construction (#15729)
2015-09-29 10:08:13 -04:00
Brad King ee1b041108 Merge topic 'simplify-qt-autogen'
1fe39020 QtAutogen: Port away from cmLocalGenerator.
59a729b2 QtAutogen: Split initializer class into separate file.
1e83a963 QtAutogen: Split initializer methods into separate class.
12f0e13c QtAutogen: Simplify generator initialization API.
65ff75d3 QtAutogen: Remove unnecessary dereference.
64b78c14 QtAutogen: Move Source initialization to prior loop.
c3c20d3c QtAutogen: Add _automoc.cpp sources before initializing.
8b6ec29d QtAutogen: Move initialization condition to caller.
9470b056 QtAutogen: Move condition to prior loop.
b7491b1c QtAutogen: Move condition to prior loop.
e791c854 QtAutogen: Make some methods static.
6210ec64 QtAutogen: Make internal method private.
a3ceb998 QtAutogen: Don't use members to initialize automoc targets.
dced2fe1 QtAutogen: Rename variable.
f9a77e76 QtAutogen: Don't use a member to store skipped uic files.
c3633e7a QtAutogen: Add missing includes and forward declarations.
2015-09-29 10:08:10 -04:00
Brad King 6a072563d2 Merge topic 'cpack-package-empty-dirs'
9298f56d CPack: allow packaging of empty directories
ecd71c9c SystemTools: time operations on directories
19c6f4ee SystemTools: set time file permissions
749a140a CPackDeb: allow empty directories in component packages
2015-09-29 10:08:06 -04:00
Brad King ddd082fb1f Merge topic 'ProcessorCount-SunOS-psrinfo'
1ff96bf6 ProcessorCount: Implement with psrinfo tool on recent SunOS versions
2015-09-29 10:08:04 -04:00
Brad King 1d11f3ca68 Merge topic 'link-https-cmake.org'
da7276cf Replace http://www.cmake.org URLs with https://cmake.org
2015-09-29 10:08:02 -04:00
Stephen Kelly 9bc6eb8e1f cmGlobalGenerator: Initialize generator targets on construction (#15729)
The Ninja generator and Visual Studio generators are special-cased for the
QtAutogen feature.  In order to reduce the number of custom targets, the Visual
Studio generators prefer to create custom commands instead, and in order to
create appropriate Ninja files, generated rcc files are listed as byproducts.

This requires the use of the GetConfigCommonSourceFiles API of the
cmGeneratorTarget for those generators when initializing the autogen target.
The initializer method is called from Compute() after the cmGeneratorTarget
objects are created, however the initialization of the object directory occurs
later in the InitGeneratorTargets method.  That means that the resulting object
locations are computed incorrectly and cached before the object directory is
determined, so the generated buildsystem can not find the object files.

The initialization of the object directory was split from the creation of
cmGeneratorTarget instances in commit 0e0258c8 (cmGlobalGenerator: Split
creation of generator object from initialization., 2015-07-25).  The motivation
for the split was to do only what is essential to do early in cases where
cmGeneratorTargets need to be created at configure-time.  That is required for
the purpose of implementing policies CMP0024 and CMP0026, and for
try_compile(LINK_LIBRARIES).  However, the split was not really necessary.

Compute the object directory in the cmGeneratorTarget constructor instead.

The QtAutogen unit test already tests the use of TARGET_OBJECTS with AUTOMOC,
and that test already passes on Ninja.  The reason it already passes is that
the QtAutogen target also uses the AUTORCC feature, and specifies several qrc
files in its SOURCES.  Later in the Compute algorithm (after the
InitGeneratorTargets call), the rcc files are determined and target->AddSource
is called.  The AddSource call clears the previously mentioned cache of source
files, causing it to be regenerated when next queried, this time taking account
of the object directory.

Extend the test suite with a new target which does not make use of AUTORCC with
qrc files so that the test added alone would break without the fix in this
commit.
2015-09-29 09:56:34 -04:00
Stephen Kelly 1fe390201d QtAutogen: Port away from cmLocalGenerator. 2015-09-29 09:56:23 -04:00
Stephen Kelly 59a729b2be QtAutogen: Split initializer class into separate file. 2015-09-29 09:56:23 -04:00
Kitware Robot db70fcb110 CMake Nightly Date Stamp 2015-09-29 00:01:06 -04:00
Domen Vrankar 9298f56dce CPack: allow packaging of empty directories 2015-09-29 01:18:18 +02:00
Domen Vrankar ecd71c9c1a SystemTools: time operations on directories
On windows FILE_FLAG_BACKUP_SEMANTICS enables us to
read/write time both on files and directories.
2015-09-29 01:18:14 +02:00
Domen Vrankar 19c6f4eefc SystemTools: set time file permissions
On Windows if file permissions are read only
FILE_WRITE_ATTRIBUTES will enables us to
get file handle and change file time.
2015-09-29 01:18:10 +02:00
Raffi Enficiaud 749a140a0c CPackDeb: allow empty directories in component packages 2015-09-29 01:18:04 +02:00
Marc Chevrier 1ff96bf69c ProcessorCount: Implement with psrinfo tool on recent SunOS versions 2015-09-28 11:30:41 -04:00
Mike Pagel fa5284f07f VS: Prevent generated "rule" files from causing rebuilds
When we generate a ".rule" file to attach a custom command in a VS IDE
project, set the file timestamp to be old enough to prevent the rule
from re-running due to its timestamp.
2015-09-28 10:58:57 -04:00
Brad King 6c6a8c5d5a Merge topic 'minor-cleanups'
51e48637 VS: Remove impossible condition.
203eada6 cmMakefile: Remove Configured state.
5642449a cmCommand: Remove IsDiscouraged interface.
77c6a339 cmSetCommand: Re-use local named variable.
732f5511 cmSetCommand: Fix typo in comment.
8544f16d cmGlobalGenerator: Devirtualize method.
9096daaf Ninja: Remove unused variable.
2015-09-28 10:44:59 -04:00
Brad King 5b46528427 Merge topic 'optimize-variable-replacement'
256c78ad Build: Set CMP0053 to NEW.
2015-09-28 10:44:57 -04:00
Brad King 664fd4d1da Merge topic 'test-Wno-dev'
bc3e1e4b Tests: Add case for -Wdev and -Wno-dev with non-message() warnings (#15747)
2015-09-28 10:44:55 -04:00
Brad King bc92647b91 Merge topic 'update-kwsys'
946e8615 Merge branch 'upstream-kwsys' into update-kwsys
29ad0694 KWSys 2015-09-25 (dc4e4a55)
2015-09-28 10:44:52 -04:00
Brad King 5ed2292d3a Merge topic 'ninja-cleanup-path-conversion'
6e2a4087 Ninja: Centralize path conversion in global generator (#15757)
993d0641 Ninja: Fix OBJECT_DIR placeholder substitution in link rules
2015-09-28 10:44:48 -04:00
Brad King ac5ead4a9c Merge topic 'test-fix-C-comments'
4eb77a1c Tests: Use C-Style comments in C sources and headers
2015-09-28 10:44:46 -04:00
Brad King cfcd5e8518 Merge topic 'genex-SHELL_PATH'
ca6ba3fe Genex: Add a SHELL_PATH expression
7de868c4 Tests: Simplify GeneratorExpression check implementation
2015-09-28 10:44:43 -04:00
Brad King b0b255aaa7 Merge topic 'test-RunCMake-BuildDepends-Borland'
67040500 Tests: Fix RunCMake.BuildDepends filesystem delay for Borland Makefiles
2015-09-28 10:44:41 -04:00
Brad King c0574fd067 Merge topic 'jsoncpp-add-missing-cast'
a7fe4413 jsoncpp: Add missing cast to convert from char to UInt
2015-09-28 10:44:39 -04:00
Stefan Kislinskiy ca6ba3fee5 Genex: Add a SHELL_PATH expression
Some commands on Windows do not understand forward slash paths and
require backslashes.  In order to help projects generate shell
invocations of such commands, provide a generator expression to convert
paths to the shell-preferred path format for the current generator.
This will allow custom commands to generate paths the same way CMake
does for compiler command invocations.
2015-09-28 10:37:33 -04:00
Kitware Robot 4480a9262d CMake Nightly Date Stamp 2015-09-28 00:01:04 -04:00
Stephen Kelly 51e4863782 VS: Remove impossible condition. 2015-09-27 12:09:33 +02:00
Stephen Kelly 203eada65e cmMakefile: Remove Configured state.
It is vestigial.
2015-09-27 12:08:07 +02:00