Commit Graph

18074 Commits

Author SHA1 Message Date
Stephen Kelly ecdb1b3bba Add some missing includes. 2015-04-12 20:09:25 +02:00
Stephen Kelly 04b307b961 cmake: Simplify CommandExists method. 2015-04-12 20:08:49 +02:00
Stephen Kelly 0f1f324b0d cmake: Rename oddly named variables. 2015-04-12 20:08:49 +02:00
Stephen Kelly 275185ac2b cmake: Constify GetCommand method. 2015-04-12 20:08:49 +02:00
Stephen Kelly c57f086a81 cmake: Don't lower-case a string needlessly. 2015-04-12 20:08:48 +02:00
Stephen Kelly 23368c9b83 cmake: Use make_pair instead of Foo::value_type.
It works with all supported compilers.
2015-04-12 20:08:48 +02:00
Stephen Kelly 14c70b8c58 cmake: out-of-line try compile state methods. 2015-04-12 20:08:48 +02:00
Stephen Kelly 6ed19e615b cmake: Remove duplicate condition. 2015-04-12 20:08:47 +02:00
Stephen Kelly ade20b433b cmake: Remove DebugConfigs member.
It adds needless complexity to global property handling.
2015-04-12 20:08:47 +02:00
Stephen Kelly 7450a2c6ed cmake: Remove method with no external users.
Port internal users to access the member.
2015-04-12 20:08:46 +02:00
Stephen Kelly 8c13d7709b cmake: Don't set the CMakeInstance on the Properties member.
There is no need, as global properties have nowhere to chain up
to.
2015-04-12 20:08:45 +02:00
Stephen Kelly 55ecd818f6 cmGlobalGenerator: Store languages as vector, not map.
The second component of the map is never used.
2015-04-12 20:08:42 +02:00
Kitware Robot e9e417b57c CMake Nightly Date Stamp 2015-04-12 00:01:04 -04:00
Kitware Robot 18b58b618c CMake Nightly Date Stamp 2015-04-11 00:01:13 -04:00
Brad King 9660a3ccea Makefile: Fix multiple custom command outputs with one missing
The use of "cmake -E touch_nocreate" added in commit v3.2.1~4^2
(Makefile: Fix multiple custom command outputs regression, 2015-03-06)
caused builds to fail when one of the outputs is intentionally not
created.  This was fixed by our parent commit by making touch_nocreate
succeed when the file is missing.  Add a test case covering it.

For the Watcom WMake generator, check for the SYMBOLIC source file
property separately on each output.  The mark is needed on outputs that
are not really created to tell 'wmake' not to complain that it is
missing.  The mark is also needed on outputs that are created or 'wmake'
will not consider them out of date when they exist.

Inspired-by: Ben Boeckel <ben.boeckel@kitware.com>
2015-04-10 16:27:42 -04:00
Gerald Combs 588dcb33b7 cmake: Provide guidance when an invalid -G option is given
Print a list of generators if no generator or an invalid one is
supplied.

Signed-off-by: Gerald Combs <gerald@wireshark.org>
2015-04-10 15:14:34 -04:00
Brad King 5c08e2559c KWSys SystemTools: Teach Touch with !create to succeed on missing file 2015-04-10 12:51:10 -04:00
Nils Gladitz d2cc580704 cmake: Teach "-E tar" command a "--format=" option
Allows specifying a libarchive defined archive format currently restricted to
7zip, gnutar, pax, paxr and zip.

The default is "paxr" (pax restricted).
2015-04-10 08:32:31 -04:00
Kitware Robot a74d558d10 CMake Nightly Date Stamp 2015-04-10 00:01:05 -04:00
Brad King 26d6c095d6 Merge topic 'refactor-cache-api'
ba404938 cmCacheManager: Port consumers to non-iterator API.
f3922a9a Port QtDialog to non-iterator cache API.
3e6a76e4 Port CursesDialog to non-iterator cache API.
9e641567 cmMakefile: Port away from CacheEntry.Initialized.
1e2dbfce cmCacheManager: Add non-iterator-based API.
60a62a91 cmCacheManager: Return a C string from GetValue.
77f2807c cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue.
14973054 Add API for cache loading, deleting and saving to the cmake class.
1f2c12eb cmMakefile: Remove cache version accessors.
97c50a8d cmMakefile: Simplify GetDefinitions implementation.
2015-04-09 11:32:36 -04:00
Brad King 81f627d53b Merge topic 'cmake-command-line-help-vs-arch'
1e384337 cmake: Show in --help how to select VS target platform (#15422)
2015-04-09 11:32:34 -04:00
Brad King 1a1bdbfd87 Merge topic 'link-implicit-libs-full-path'
882f48e5 Link libraries by full path even in implicit directories
318cd370 Help: Add link target for Find Modules section of cmake-developer.7
1535dcd8 Tests: Teach RunCMake to optionally merge command output to stdout
2015-04-09 11:32:31 -04:00
Brad King 882f48e5ba Link libraries by full path even in implicit directories
When CMP0003 was first introduced we wanted to link all libraries by
full path.  However, some projects had problems on platforms where
find_library would find /usr/lib/libfoo.so when the project really
wanted to link to /usr/lib/<arch>/libfoo.so and had been working by
accident because pre-CMP0003 behavior used -lfoo to link.

We first tried to address that in commit v2.6.0~440 (Teach find_library
to avoid returning library paths in system directories, 2008-01-23) by
returning just "foo" for libraries in implicit link directories.  This
caused problems for projects expecting find_library to always return a
full path.  We ended up using the solution in commit v2.6.0~366 (...
switch library paths found in implicit link directories to use -l,
2008-01-31).  However, the special case for libraries in implicit link
directories has also proven problematic and confusing.

Introduce policy CMP0060 to switch to linking all libraries by full path
even if they are in implicit link directories.  Explain in the policy
documentation the factors that led to the original approach and now to
this approach.
2015-04-09 11:29:18 -04:00
Geoff Viola 051d8be17f cmLocalGenerator: Constify some cmTarget and cmGeneratorTarget arguments 2015-04-09 10:38:31 -04:00
Kitware Robot 3049951b62 CMake Nightly Date Stamp 2015-04-09 00:01:05 -04:00
Stephen Kelly ba404938a2 cmCacheManager: Port consumers to non-iterator API.
This simplifies reasoning about the follow-up commit which ports
away from cmCacheManager to a class with the same method names.
2015-04-08 18:47:00 +02:00
Stephen Kelly f3922a9a5b Port QtDialog to non-iterator cache API. 2015-04-08 18:47:00 +02:00
Stephen Kelly 3e6a76e48b Port CursesDialog to non-iterator cache API. 2015-04-08 18:47:00 +02:00
Stephen Kelly 9e64156725 cmMakefile: Port away from CacheEntry.Initialized.
The API has no other external users.
2015-04-08 18:47:00 +02:00
Stephen Kelly 1e2dbfce37 cmCacheManager: Add non-iterator-based API.
The iterator pattern is an unusual one for CMake, and it hinders
refactoring all configuration-time data manipulation into a
single class.
2015-04-08 18:47:00 +02:00
Stephen Kelly 60a62a91c4 cmCacheManager: Return a C string from GetValue.
This is for consistency with other CMake access interfaces such as
definitions and properties which use a null value as a 'not present'
value.  It is source compatible with existing callers, and it returns
a pointer into actual real cache entry storage.
2015-04-08 18:45:51 +02:00
Brad King 977796e307 Merge topic 'emulator-property'
1975d53a Help: Add notes for topic 'emulator-property'
9160d6c2 TestGenerator: Add CROSSCOMPILING_EMULATOR support.
e942526b try_run: Use CMAKE_CROSSCOMPILING_EMULATOR.
579c4bec Properties: Add CROSSCOMPILING_EMULATOR target property.
2015-04-08 09:07:03 -04:00
Brad King 710968e371 Merge topic 'xcode-quote-path'
dfd6f1f2 Xcode: Also quote strings containing // (#15487)
2015-04-08 09:06:59 -04:00
Matt McCormick 9160d6c241 TestGenerator: Add CROSSCOMPILING_EMULATOR support.
Prefix test commands with the CROSSCOMPILING_EMULATOR property
for target executables. This allows test suites to be run on the host
when crosscompiling.
2015-04-08 09:06:22 -04:00
Matt McCormick e942526b3d try_run: Use CMAKE_CROSSCOMPILING_EMULATOR.
If the CMAKE_CROSSCOMPILING_EMULATOR variable is defined, and
CMAKE_CROSSCOMPILING is TRUE, then use CMAKE_CROSSCOMPILING_EMULATOR to run
the try_run executables. This prevents the need to populate
TryRunResults.cmake when cross compiling.
2015-04-08 09:06:22 -04:00
Kitware Robot bddd8c0551 CMake Nightly Date Stamp 2015-04-08 00:01:05 -04:00
Stephen Kelly 77f2807ce5 cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue.
Being initialized is a requirement for this method to return something,
and is what differentiates it from using GetIterator with it.GetValue.
2015-04-07 23:25:44 +02:00
Stephen Kelly 14973054a2 Add API for cache loading, deleting and saving to the cmake class.
Migrate existing users of the CacheManager API to use the new
API.  The CacheManager will be going away soon.
2015-04-07 23:25:39 +02:00
Stephen Kelly 1f2c12ebd1 cmMakefile: Remove cache version accessors.
They are only used by legacy code. Inline them there to simplify
cmMakefile.
2015-04-07 23:25:35 +02:00
Stephen Kelly 97c50a8dbd cmMakefile: Simplify GetDefinitions implementation. 2015-04-07 23:25:31 +02:00
Brad King d3823263b2 Merge topic 'refactor-cache-api'
3347c5e4 Revert topic 'refactor-cache-api'
2015-04-07 17:15:52 -04:00
Brad King 3347c5e4f9 Revert topic 'refactor-cache-api'
This topic was never tested without some follow-up commits.  The
GetCacheEntryValue API returns a pointer to memory freed on return.
It will have to be revised along with the rest of the original topic.
2015-04-07 17:15:04 -04:00
Brad King 1e3843373f cmake: Show in --help how to select VS target platform (#15422)
* Re-order VS generators from newest to oldest.

* Show how to specify a VS generator with a target platform

* Increase the option output indentation to avoid extra wrapping
  with longer generator names.
2015-04-07 16:47:53 -04:00
Brad King 678493d60f Merge topic 'refactor-cache-api'
9410e24a cmCacheManager: Port consumers to non-iterator API.
7b7ae3b1 Port QtDialog to non-iterator cache API.
228c629c Port CursesDialog to non-iterator cache API.
2e50f5e7 cmMakefile: Port away from CacheEntry.Initialized.
e6224367 cmCacheManager: Add non-iterator-based API.
9ada4c04 cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue.
1fe7f24c Add API for cache loading, deleting and saving to the cmake class.
08c642c6 cmMakefile: Remove cache version accessors.
cec8f97e cmMakefile: Simplify GetDefinitions implementation.
2015-04-07 16:04:05 -04:00
Matt McCormick 579c4bec6e Properties: Add CROSSCOMPILING_EMULATOR target property.
Add CROSSCOMPILING_EMULATOR target property for executables. This is used by
subsequent patches to run exectuables created for the target system when
crosscompiling. The property is initialized by the
CMAKE_CROSSCOMPILING_EMULATOR variable when defined.
2015-04-07 13:33:34 -04:00
Brad King 64a6491fb6 Merge topic 'minor-cleanups'
c22f6c15 Remove unused includes.
2015-04-07 11:29:35 -04:00
Kitware Robot 52d5a9b60b CMake Nightly Date Stamp 2015-04-07 00:01:05 -04:00
Stephen Kelly 9410e24a4a cmCacheManager: Port consumers to non-iterator API.
This simplifies reasoning about the follow-up commit which ports
away from cmCacheManager to a class with the same method names.
2015-04-06 17:58:55 +02:00
Stephen Kelly 7b7ae3b1a1 Port QtDialog to non-iterator cache API. 2015-04-06 17:58:55 +02:00
Stephen Kelly 228c629c18 Port CursesDialog to non-iterator cache API. 2015-04-06 17:58:55 +02:00
Stephen Kelly 2e50f5e7d9 cmMakefile: Port away from CacheEntry.Initialized.
The API has no other external users.
2015-04-06 17:58:55 +02:00
Stephen Kelly e62243674e cmCacheManager: Add non-iterator-based API.
The iterator pattern is an unusual one for CMake, and it hinders
refactoring all configuration-time data manipulation into a
single class.
2015-04-06 17:58:55 +02:00
Stephen Kelly 9ada4c0433 cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue.
Being initialized is a requirement for this method to return something,
and is what differentiates it from using GetIterator with it.GetValue.
2015-04-06 17:58:55 +02:00
Stephen Kelly 1fe7f24c2b Add API for cache loading, deleting and saving to the cmake class.
Migrate existing users of the CacheManager API to use the new
API.  The CacheManager will be going away soon.
2015-04-06 17:58:55 +02:00
Stephen Kelly 08c642c6ae cmMakefile: Remove cache version accessors.
They are only used by legacy code. Inline them there to simplify
cmMakefile.
2015-04-06 17:58:54 +02:00
Stephen Kelly cec8f97e57 cmMakefile: Simplify GetDefinitions implementation. 2015-04-06 17:58:54 +02:00
Brad King 9b7213dc47 Merge topic 'minor-cleanups'
c37cf7fa cmCacheManager: Remove unused method
64556e3d cmCacheManager: Remove unused overloads.
23bb5d22 cmCacheManager: Remove use of intermediate overload.
510562e3 cmGlobalGenerator: Don't fetch the cache manager in a loop.
629e9489 cmake: Clear member rather than explicit erase.
d280bae9 cmake: Be clear that there is no chaining after global properties.
364c7ea1 cmake: Remove unused method.
47acfe1d cmake: Remove unused member.
a469bf7b cmMakefile: Remove one wrong and one insufficiently helpful comment.
257c1649 cmListFile: Remove unused member.
fe17092c cmMakefile: Remove bogus comment.
199b28ac Remove duplicate tag name.
2015-04-06 09:19:34 -04:00
Brad King 0e6b00ee49 Merge topic 'cpack-one-component-only'
0ffd3534 CPack single component packaging
2015-04-06 09:11:34 -04:00
Brad King b9c1eb4dcc Merge topic 'makefile-depscan-BOM'
af924827 Makefile: Tolerate a BOM while scanning source dependencies (#15493)
2015-04-06 08:58:17 -04:00
Brad King 9ddbacdb74 Merge topic 'test_cpack_symlinks'
5f686b8a Tests: Add case for CPack source package with symlinks
aca1d93b cpack: Disable CMake Cygwin legacy warning while packaging
2015-04-06 08:58:14 -04:00
Stephen Kelly c22f6c1504 Remove unused includes. 2015-04-06 14:41:05 +02:00
Kitware Robot 03f7a509ef CMake Nightly Date Stamp 2015-04-06 00:01:04 -04:00
Domen Vrankar 0ffd35340e CPack single component packaging
RPM, DEB and archive packages were not created
in cases when CPACK_<generator>_COMPONENT_INSTALL
was set to ON and a single component existed.
Patch also changes CPackRPM test to implicitly
test for this case.
2015-04-05 22:49:41 +02:00
Stephen Kelly c37cf7fa9e cmCacheManager: Remove unused method 2015-04-05 10:26:10 +02:00
Stephen Kelly 64556e3dfa cmCacheManager: Remove unused overloads. 2015-04-05 10:26:10 +02:00
Stephen Kelly 23bb5d225b cmCacheManager: Remove use of intermediate overload. 2015-04-05 10:26:10 +02:00
Stephen Kelly 510562e3e7 cmGlobalGenerator: Don't fetch the cache manager in a loop.
It doesn't change from Makefile to Makefile.
2015-04-05 10:26:10 +02:00
Stephen Kelly 629e948936 cmake: Clear member rather than explicit erase. 2015-04-05 10:26:10 +02:00
Stephen Kelly d280bae98f cmake: Be clear that there is no chaining after global properties. 2015-04-05 10:26:09 +02:00
Stephen Kelly 364c7ea187 cmake: Remove unused method. 2015-04-05 10:26:09 +02:00
Stephen Kelly 47acfe1d1e cmake: Remove unused member. 2015-04-05 10:10:00 +02:00
Kitware Robot a3e2de3a31 CMake Nightly Date Stamp 2015-04-05 00:01:04 -04:00
Gregor Jasny dfd6f1f290 Xcode: Also quote strings containing // (#15487)
Otherwise those will be interpreted as start of a comment

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-04-04 22:13:45 +02:00
Stephen Kelly a469bf7b98 cmMakefile: Remove one wrong and one insufficiently helpful comment. 2015-04-04 18:31:03 +02:00
Stephen Kelly 257c16495a cmListFile: Remove unused member.
It is written, but not read since commit v2.4.0~575 (ENH: Since list file
cache does not make much sense any more ..., 2006-02-07).
2015-04-04 18:31:03 +02:00
Stephen Kelly fe17092c20 cmMakefile: Remove bogus comment. 2015-04-04 18:31:03 +02:00
Stephen Kelly 199b28ac3a Remove duplicate tag name. 2015-04-04 18:30:52 +02:00
Kitware Robot c6624cfdc1 CMake Nightly Date Stamp 2015-04-04 00:01:05 -04:00
Gilles Khouzam 01a9ab0def VS: Add support for XAML source files
XAML files are by default of type Page in the vcxproj and can be
overriden by setting the VS_XAML_TYPE property.  The .cpp and .h file
of the same name are automatically added as depending on the XAML file.

New VSXaml test builds a basic XAML WindowsStore 8.1 app with VS2013.
2015-04-03 13:40:35 -04:00
Brad King af92482712 Makefile: Tolerate a BOM while scanning source dependencies (#15493)
Otherwise an #include directive on the first line of a source file is
ignored if the file contains a Byte-Order-Mark.

Suggested-by: Aleksey Konovalov <konovalov.aleks@gmail.com>
2015-04-03 13:04:57 -04:00
Kitware Robot 2978a5549a CMake Nightly Date Stamp 2015-04-03 00:01:04 -04:00
Brad King 0983825057 Merge topic 'remove-DEFINITIONS-directory-property'
06f61c26 Do not treat DEFINITIONS as a built-in directory property
2015-04-02 13:06:03 -04:00
Stephen Kelly 06f61c26cf Do not treat DEFINITIONS as a built-in directory property
Add policy CMP0059 to cover this change.  The property has been
deprecated since CMake 2.4 anyway.

This will help clean up cmMakefile -- the DefineFlagsOrig member should
not need to exist.
2015-04-02 13:00:48 -04:00
Brad King 9780859b7e Merge topic 'clean-up-cmMakefile'
f2e07a6d cmMakefile: Remove unused PreOrder member.
aafe2821 cmMakefile: Remove unused Prefix member.
1fcf590b cmMakefile: Remove unused SubDirectoryOrder member.
c3a60cc9 cmMakefile: Remove AddExtraDirectory method.
37897347 cmMakefile: Remove unused method.
d7539ced cmMakefile: Remove bogus comment.
2015-04-02 12:57:41 -04:00
Brad King 1a775917a5 Merge topic 'xcode-source-type-metal'
078c7321 Xcode: Add file type for Metal shader files
2015-04-02 12:57:18 -04:00
Kitware Robot f707460e42 CMake Nightly Date Stamp 2015-04-02 00:01:04 -04:00
Sean James 078c732185 Xcode: Add file type for Metal shader files 2015-04-01 15:15:22 -04:00
Stephen Kelly f2e07a6d90 cmMakefile: Remove unused PreOrder member.
Remove references from dependendent API.
2015-04-01 20:32:48 +02:00
Stephen Kelly aafe282188 cmMakefile: Remove unused Prefix member.
Unused since it was added in commit 1f42f521 (NEW: move from tools
and config to create CMake, 2000-08-29).
2015-04-01 20:32:48 +02:00
Stephen Kelly 1fcf590b14 cmMakefile: Remove unused SubDirectoryOrder member.
The last use was removed in v2.4.0~2054 (ENH: add support for out
of source source, 2005-03-14)
2015-04-01 20:32:47 +02:00
Stephen Kelly c3a60cc9cc cmMakefile: Remove AddExtraDirectory method.
It has no effect.
2015-04-01 20:32:47 +02:00
Stephen Kelly 37897347b3 cmMakefile: Remove unused method.
The last user was removed in commit v2.4.0~1516 (ENH: removed unused
files, 2005-06-20).
2015-04-01 20:32:47 +02:00
Stephen Kelly d7539ced64 cmMakefile: Remove bogus comment. 2015-04-01 20:32:47 +02:00
Brad King 0de7807c36 Merge topic 'cpack-deb-format-cast'
e86f44b7 cmCPackDebGenerator: Cast file mode to proper type for %o formatter
2015-04-01 13:19:41 -04:00
Brad King 4a821a47f7 Merge topic 'cpack-fix-preinstall-tool'
93a3ec8b CPack: Fix make tool selection during preinstall (#15483)
2015-04-01 13:19:37 -04:00
Brad King aa508a5299 Merge topic 'makefile-DELETE_ON_ERROR'
44990732 Help: Add notes for topic 'makefile-DELETE_ON_ERROR'
4adf1dad Makefile: Tell GNU make to delete rule outputs on error (#15474)
2015-04-01 13:19:32 -04:00
Brad King aca1d93bd9 cpack: Disable CMake Cygwin legacy warning while packaging
In cpack we load the platform information modules to give the
configuration scripts access to the host system information.
CYGWIN.cmake warns unless we explicitly tell it not to warn
since there is no chance for a cmake_minimum_required(VERSION)
to be called.
2015-04-01 12:57:43 -04:00
Kitware Robot c0312d9276 CMake Nightly Date Stamp 2015-04-01 00:01:04 -04:00
Brad King e86f44b726 cmCPackDebGenerator: Cast file mode to proper type for %o formatter 2015-03-31 16:28:28 -04:00
Brad King 93a3ec8b77 CPack: Fix make tool selection during preinstall (#15483)
The CMAKE_MAKE_PROGRAM selected by CMake while configuring the project
should also be used to drive the "preinstall" target during packaging.
Teach CPack to use "cmake --build" instead of constructing the build
command line itself.  The "cmake --build" command already knows how
to select the proper make tool.
2015-03-31 10:30:25 -04:00
Kitware Robot a6b0b835ac CMake Nightly Date Stamp 2015-03-31 00:01:04 -04:00
Brad King 4adf1dad2a Makefile: Tell GNU make to delete rule outputs on error (#15474)
Add .DELETE_ON_ERROR to the "build.make" files that contain the actual
build rules that generate files.  This tells GNU make to delete the
output of a rule if the recipe modifies the output but returns failure.
This is particularly useful for custom commands that use shell
redirection to produce a file.

Do not add .DELETE_ON_ERROR for Borland or Watcom make tools because
they may not tolerate it and would not honor it anyway.  Other make
tools that do not understand .DELETE_ON_ERROR will not be hurt.

Suggested-by: Andrey Vihrov <andrey.vihrov@gmail.com>
2015-03-30 16:35:48 -04:00
Brad King c1f8c6cdf9 Merge topic 'cpack-archive-prefix'
e3f84fc5 cpack: Fix CPACK_PACKAGING_INSTALL_PREFIX handling for archives (#14677)
2015-03-30 09:27:55 -04:00
Brad King c117c2bb5e Merge topic 'add_dependencies-INTERFACE-libraries'
ac14cbf0 Allow add_dependencies() on INTERFACE libraries (#15414)
817d31db Help: Format add_dependencies documentation
2015-03-30 09:27:53 -04:00
Brad King a3bdb5578d Merge topic 'ninja-autogen'
4d08e6b6 QtAutogen: Fix rcc rebuild with Ninja generator (#15459)
2015-03-30 09:27:51 -04:00
Brad King ac6297ea38 Merge topic 'xcode-default-ARCHS'
b76b52c0 Xcode: Set ARCHS only when CMAKE_OSX_ARCHITECTURES is specified (#14736)
9e14a5de cmGlobalXCodeGenerator: Simplify ARCHS list with cmJoin
2015-03-30 09:27:47 -04:00
Brad King 136a534f72 Merge topic 'wix-fix-utf8'
98a3b2e2 CPackWIX: Omit codepage conversion when internal encoding is already UTF-8.
2015-03-30 09:27:45 -04:00
Brad King aa15ef8a84 Merge topic 'clean-scanbuild-warnings'
e680d43d Fix an unused variable warning from scanbuild.
a4a1b729 Fix warnings from clang scanbuild.
2015-03-30 09:27:42 -04:00
Clinton Stimpson e3f84fc504 cpack: Fix CPACK_PACKAGING_INSTALL_PREFIX handling for archives (#14677)
Fix the case when the archive generator is used to package components
with an install prefix.
2015-03-30 09:22:14 -04:00
Kitware Robot 6474f0e263 CMake Nightly Date Stamp 2015-03-30 00:01:04 -04:00
Kitware Robot d35da54888 CMake Nightly Date Stamp 2015-03-29 00:01:04 -04:00
Kitware Robot 918fe54c82 CMake Nightly Date Stamp 2015-03-28 00:01:04 -04:00
Brad King ac14cbf017 Allow add_dependencies() on INTERFACE libraries (#15414)
Revert commit v3.0.0-rc1~175^2~20 (add_dependencies: Disallow use with
INTERFACE_LIBRARY, 2013-12-25).  Teach our dependency analysis to
transitively follow INTERFACE target utility dependencies as was done or
IMPORTED targets in commit v2.8.6~127^2~1 (Allow add_dependencies() on
imported targets, 2010-11-19).  Extend the InterfaceLibrary test with a
case to cover header generation for a header-only INTERFACE library via
a custom target.
2015-03-27 16:25:09 -04:00
Brad King 4d08e6b6dd QtAutogen: Fix rcc rebuild with Ninja generator (#15459)
The rcc outputs are byproducts of the cmake_autogen rule, not outputs.
We still must run cmake_autogen on every run even if the rcc outputs
exist.  Ninja requires explicit byproduct specification, which is now
possible in CMake since commit v3.2.0-rc1~340^2~2 (Add an option for
explicit BYPRODUCTS of custom commands, 2014-11-13).  Revise the logic
introduced by commit v3.2.0-rc1~480^2 (QtAutogen: Regenerate qrc files
if their input changes, 2014-09-17) to specify byproducts explicitly.
2015-03-27 15:33:19 -04:00
Brad King b76b52c0b4 Xcode: Set ARCHS only when CMAKE_OSX_ARCHITECTURES is specified (#14736)
Teach the Xcode generator that ONLY_ACTIVE_ARCH=YES means to use ARCHS,
and that the default of ONLY_ACTIVE_ARCH=NO means to use NATIVE_ARCH and
ignore ARCHS.  In the latter case there is no reason to generate ARCHS.
2015-03-27 10:52:32 -04:00
Brad King 9e14a5dee2 cmGlobalXCodeGenerator: Simplify ARCHS list with cmJoin 2015-03-27 09:50:14 -04:00
Brad King a92f217a4b Merge topic 'wix-external-expat'
86037915 CPackWIX: Add static_casts for XML_Parser.
2015-03-27 09:15:23 -04:00
Brad King b6f67227f1 Merge topic 'qtdialog-cpack-qt5-osx'
9c76ff01 QtDialog: Fix CMake packaging with CPack on OS X with Qt5.
2015-03-27 09:15:09 -04:00
Nils Gladitz 98a3b2e29e CPackWIX: Omit codepage conversion when internal encoding is already UTF-8. 2015-03-27 12:22:15 +01:00
Kitware Robot 685d179b8b CMake Nightly Date Stamp 2015-03-27 00:01:04 -04:00
Nils Gladitz 8603791553 CPackWIX: Add static_casts for XML_Parser.
"XML_Parser" in cmexpat is a typedef for void* while newer releases of
expat seem to use struct XML_ParserStruct *XML_Parser.

Add static_casts so that the build works with either variant.
2015-03-26 16:56:44 +01:00
Bill Hoffman e680d43d7d Fix an unused variable warning from scanbuild. 2015-03-26 11:05:56 -04:00
Kitware Robot 5d1d995bb7 CMake Nightly Date Stamp 2015-03-26 00:01:04 -04:00
Bill Hoffman a4a1b729c6 Fix warnings from clang scanbuild. 2015-03-25 12:38:37 -04:00
Brad King 166e29e453 Merge topic 'file-LOCK-close'
1f289095 file(LOCK): Close file descriptor/handle when releasing a lock
2015-03-25 09:01:18 -04:00
Betsy McPhail 1f289095f9 file(LOCK): Close file descriptor/handle when releasing a lock
The file lock functionality added in commit v3.2.0-rc1~297^2~1 (file:
Add LOCK subcommand to do file and directory locking, 2014-11-26) forgot
to close the lock file descriptors.  Eventually it was possible to run
out of file descriptors and locks could not longer be acquired.  Fix
this by closing the file descriptor or handle when we are done with it.
Also set the member back to the initial value from the constructor
to leave everything in a consistent state (useful for debugging).

Co-Author: Ruslan Baratov <ruslan_baratov@yahoo.com>
2015-03-25 09:00:51 -04:00
Kitware Robot 26c4300584 CMake Nightly Date Stamp 2015-03-25 00:01:04 -04:00
Clinton Stimpson 9c76ff015a QtDialog: Fix CMake packaging with CPack on OS X with Qt5. 2015-03-24 20:56:38 -06:00
Kitware Robot bcdda24851 CMake Nightly Date Stamp 2015-03-24 00:01:04 -04:00
Brad King 64e97edad7 Merge topic 'ninja-require-byproducts'
bd9c7f9b Ninja: Add policy to require explicit custom command byproducts
ed8e30b0 cmGlobalNinjaGenerator: Optimize handling of known build outputs
ad094f43 cmGlobalNinjaGenerator: Fix spelling of "unknown"
82a37d3c cmGlobalNinjaGenerator: Drop unused member
2015-03-23 09:48:07 -04:00
Brad King e85eb2e336 Merge topic 'add-extra-qbs-generator'
f85db2f3 Qbs: Add new 'extra' generator for qbs project files
2015-03-23 09:18:43 -04:00
Brad King ed99514fc1 Merge topic 'cpack-bundle-codesign'
fb3e4de8 CPack: Add support to overwrite or pass additional parameter to codesign
2015-03-23 09:18:40 -04:00
Brad King 114ddb072c Merge topic 'autogen-write-access'
610464c1 QtAutogen: Ensure write access to AutogenInfo.cmake (#15416)
2015-03-23 09:18:38 -04:00
Brad King a37937f7c0 Merge topic 'xcode-xctest'
4178cd88 Help: Add notes for topic 'xcode-xctest'
87a4b858 Tests: Add XCTest example to test Frameworks and Cocoa App Bundles
ba14510b OS X: Add FindXCTest module
3714955b OS X: Add handling for XCTest bundles
54a5cdbb Tests: Compute Xcode version for any generator on OS X
2015-03-23 09:18:29 -04:00
Brad King cc8b8cdc75 Merge topic 'ctest-repeat-until-fail'
6bce0276 Help: Add notes for topic 'ctest-repeat-until-fail'
fde70a1b ctest: Add a new --repeat-until-fail option
2015-03-23 09:18:26 -04:00
André Klitzing fb3e4de8e8 CPack: Add support to overwrite or pass additional parameter to codesign 2015-03-23 09:15:43 -04:00
Gregor Jasny 3714955b9c OS X: Add handling for XCTest bundles
An XCTest bundle is a CFBundle with a special product-type and bundle
extension.  For more information about XCTest visit the Mac Developer
library at:

  http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/testing_with_xcode/

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-03-23 09:12:18 -04:00
Bill Hoffman fde70a1b26 ctest: Add a new --repeat-until-fail option
This option tells ctest to run each test N times until the test fails or
the N times have run. This is useful for finding random failing tests.
2015-03-23 09:08:22 -04:00
Kitware Robot d67196d0e8 CMake Nightly Date Stamp 2015-03-23 00:01:03 -04:00
Kitware Robot aeb9fb9774 CMake Nightly Date Stamp 2015-03-22 00:01:05 -04:00
Kitware Robot 2ec1c0d6e0 CMake Nightly Date Stamp 2015-03-21 00:01:03 -04:00
Brad King bd9c7f9b2c Ninja: Add policy to require explicit custom command byproducts
Add policy CMP0058 to avoid generating 'phony' ninja rules for unknown
custom command dependencies.  This requires projects to specify their
custom command byproducts explicitly.  With this requirement we no
longer have to assume that unknown custom command dependencies are
generated and can instead simply assume they are source files expected
to exist when the build starts.  This is particularly important in
in-source builds.  It is also helpful for out-of-source builds to allow
Ninja to diagnose missing files before running custom command rules that
depend on them.
2015-03-20 17:40:12 -04:00
Brad King ed8e30b00d cmGlobalNinjaGenerator: Optimize handling of known build outputs
Teach WriteUnknownExplicitDependencies to take ownership of the set of
WriteBuild outputs immediately since no other methods need the data.
This avoids re-inserting the whole set into another already populated
set.
2015-03-20 13:33:13 -04:00
Brad King ad094f435e cmGlobalNinjaGenerator: Fix spelling of "unknown" 2015-03-20 13:32:55 -04:00
Justin Borodinsky 610464c12e QtAutogen: Ensure write access to AutogenInfo.cmake (#15416)
ConfigureFile uses the input file permissions, but we require write
access in cmQtAutoGenerators::SetupAutoGenerateTarget to append to the
file.
2015-03-20 10:33:52 -04:00
Stanislav Ionascu f85db2f323 Qbs: Add new 'extra' generator for qbs project files 2015-03-20 10:25:11 -04:00
Brad King c95e523db8 Merge topic 'file-globbing-directory-listing'
6e54b0b9 Help: Add notes for topic 'file-globbing-directory-listing'
a2c068a7 file: Teach GLOB to list directories optionally
2015-03-20 09:47:52 -04:00
Brad King d4d56f636b Merge topic 'update-kwsys'
0e8325db Merge branch 'upstream-kwsys' into update-kwsys
bc67dbed KWSys 2015-03-18 (9367a33b)
2015-03-20 09:47:48 -04:00
Brad King c3f416726b Merge topic 'ninja-no-circular-phony'
80afe28a Ninja: Do not generate circular phony rules (#15454)
2015-03-20 09:47:46 -04:00
Domen Vrankar a2c068a7ce file: Teach GLOB to list directories optionally
GLOB lists directories by default and GLOB_RECURSE does not.
LIST_DIRECTORIES enables user to control the behavior explicitly for
consistently for both GLOB and GLOB_RECURSE.
2015-03-20 09:45:25 -04:00
Kitware Robot a066f73263 CMake Nightly Date Stamp 2015-03-20 00:01:03 -04:00
Kitware Robot 486e9f4f49 CMake Nightly Date Stamp 2015-03-19 00:01:03 -04:00
Brad King 82a37d3ce5 cmGlobalNinjaGenerator: Drop unused member 2015-03-18 16:15:01 -04:00
Brad King 80afe28a10 Ninja: Do not generate circular phony rules (#15454)
The phony rules added by commit v2.8.12~248^2 (Ninja: Custom Command
file depends don't need to exist before building, 2013-06-07) are
circular, e.g.

  build side-effect: phony side-effect

This is not diagnosed by Ninja as of version 1.5, but the dependency
does not make sense.  Simply drop it and use phony rules of the form

  build side-effect: phony

instead.

Reported-by: Daniel Dunbar
2015-03-18 12:55:27 -04:00
Brad King 0e8325db66 Merge branch 'upstream-kwsys' into update-kwsys 2015-03-18 08:58:11 -04:00
Kitware Robot 380db3de00 CMake Nightly Date Stamp 2015-03-18 00:01:04 -04:00
Brad King e9072d26c0 Merge topic 'output-ctest-env-vars'
874fdd91 CTest: Output test-specific env vars in verbose mode (#15446)
2015-03-17 10:14:49 -04:00
Zach Mullen 874fdd914a CTest: Output test-specific env vars in verbose mode (#15446)
Any environment vars that were configured for a test via the
ENVIRONMENT property will now be output when the test is run
with verbose logging enabled.
2015-03-17 10:11:33 -04:00
Kitware Robot 4fb9abc562 CMake Nightly Date Stamp 2015-03-17 00:01:03 -04:00
Kitware Robot 0ac7d871fa CMake Nightly Date Stamp 2015-03-16 00:01:03 -04:00
Kitware Robot 607131bf8c CMake Nightly Date Stamp 2015-03-15 00:01:03 -04:00
Kitware Robot 262656b2d6 CMake Nightly Date Stamp 2015-03-14 00:01:05 -04:00
Kitware Robot 0769644212 CMake Nightly Date Stamp 2015-03-13 00:01:03 -04:00
Brad King 6390d5f5cb Merge topic 'refactor-cmGeneratorExpression'
ec428faf Genex: Extend cmGeneratorExpressionContext constructor.
082b6a9d Genex: Split cmGeneratorExpressionContext into own file.
9df1f0fc Genex: Split cmGeneratorExpressionNode into own file.
80b9f0cb Genex: Extract an evaluateWithContext method.
642048ce Help: Move docs of $<0:...> and $<1:...> to output section.
2015-03-12 15:26:45 -04:00
Brad King 0d58b082d0 Merge topic 'update-kwsys'
e433223d Merge branch 'upstream-kwsys' into update-kwsys
9a427f86 KWSys 2015-03-10 (4a698414)
2015-03-12 15:26:41 -04:00
Brad King f25aa204a2 Merge topic 'vs-express-build-output'
94887cb6 cmake: Teach --build to get VCExpress output (#15437)
2015-03-12 15:26:39 -04:00
Brad King 18e85253c3 Merge topic 'cmRemoveDuplicates-improvement'
8701a3f4 cmRemoveDuplicates: Partially specialize the API for pointer types.
eec7091d cmRemoveDuplicates: Type-parameterize all uniq-operations
7cbafa8c cmRemoveDuplicates: Store unique iterators instead of values.
2015-03-12 15:26:37 -04:00
Brad King 15b06bc012 Merge topic 'cmAlgorithms-cleanup'
95dd238f cmRemoveDuplicates: Fix iterator -> const_iterator.
4448f175 cmInstalledFile: Move Property implementation out of line.
7916d7ba Include cmAlgorithms where it is used.
2015-03-12 15:26:35 -04:00
Brad King 153e2dc3fc Merge topic 'cmAlgorithms-early-return'
3ff95f3b cmAlgorithms: Add early return in cmRemoveIndices.
2015-03-12 15:26:33 -04:00
Brad King 119f45ce2a Merge topic 'vs-Intel-Fortran-map-more-flags'
18d5a4bc VS: Add more Fortran compiler flags to flag table (#15381)
2015-03-12 15:26:29 -04:00
Brad King 7b185d5017 Merge topic 'main_dependency_diagnostic'
242c3966 add_custom_command: Diagnose MAIN_DEPENDENCY limitation.
2015-03-12 15:26:26 -04:00
Brad King addf4db06c Merge topic 'fix_jacoco_coverage_process'
c771f9d9 CTest: Fix Jacoco Coverage
2015-03-12 15:26:24 -04:00
Kitware Robot 36d4cdad0e CMake Nightly Date Stamp 2015-03-12 00:01:03 -04:00
Brad King e433223d1e Merge branch 'upstream-kwsys' into update-kwsys 2015-03-11 08:41:16 -04:00
Kitware Robot 80e8e7e956 CMake Nightly Date Stamp 2015-03-11 00:01:04 -04:00
Stephen Kelly 8701a3f468 cmRemoveDuplicates: Partially specialize the API for pointer types.
If de-duplicating a container of pointers, there is no need to
store iterators to them, as that is just more 'pointer chasing'.

Store the pointers themselves and use API which compares the pointers
in the specialization.
2015-03-11 00:17:55 +01:00
Stephen Kelly eec7091d76 cmRemoveDuplicates: Type-parameterize all uniq-operations 2015-03-11 00:17:55 +01:00
Stephen Kelly 7cbafa8c65 cmRemoveDuplicates: Store unique iterators instead of values.
There is no need to copy all of the values in the container in
order to determine uniqueness.  Iterators can be stored instead
and can be used with standard algorithms with custom comparison
methods.

This also means that we use less space in case the value_type size
is greater than sizeof(iterator).  That is common for std::string
which may require up to 32 bytes (libstdc++ 5.0 and MSVC at least).
With libstdc++ 4.9 and older, std::string is 8 bytes, so we likely
don't gain anything here.

Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
2015-03-11 00:17:55 +01:00
Stephen Kelly 95dd238f5c cmRemoveDuplicates: Fix iterator -> const_iterator. 2015-03-11 00:17:30 +01:00
Stephen Kelly 4448f175c8 cmInstalledFile: Move Property implementation out of line.
Don't require re-building the world when changing cmAlgorithms.h.
2015-03-11 00:17:29 +01:00
Stephen Kelly 7916d7bac6 Include cmAlgorithms where it is used. 2015-03-11 00:17:29 +01:00
Stephen Kelly ec428fafcf Genex: Extend cmGeneratorExpressionContext constructor.
Initialize the members in the appropriate place.
2015-03-11 00:12:56 +01:00
Stephen Kelly 082b6a9d78 Genex: Split cmGeneratorExpressionContext into own file. 2015-03-11 00:12:56 +01:00
Stephen Kelly 9df1f0fce1 Genex: Split cmGeneratorExpressionNode into own file. 2015-03-11 00:12:56 +01:00
Stephen Kelly 3ff95f3b0b cmAlgorithms: Add early return in cmRemoveIndices.
Avoid derefencing the iterator and segfaulting if the range
is empty.
2015-03-10 21:20:58 +01:00
Stephen Kelly 80b9f0cbe2 Genex: Extract an evaluateWithContext method.
Make it easier to make modifications to the context before
evaluating with it.
2015-03-10 21:19:38 +01:00
Brad King 732d8a467a CMake 3.2.1 2015-03-10 09:15:35 -04:00
Brad King ad6fbb88bb Merge topic 'target-language-genex'
232a6883 Help: Add release notes for target-language-genex.
9e168941 File(GENERATE): Process genex evaluation files for each language.
b734fa44 Genex: Allow COMPILE_LANGUAGE when processing include directories.
0b945ea9 Genex: Allow COMPILE_LANGUAGE when processing compile definitions.
5c559f11 Genex: Enable use of COMPILE_LANGUAGE for compile options.
e387ce7d Genex: Add a COMPILE_LANGUAGE generator expression.
4a0128f4 VS6: Compute CMAKE_*_FLAGS and COMPILE_DEFINITIONS* only when needed
2015-03-10 09:12:34 -04:00
Brad King 01fadeb205 Merge topic 'ninja-check-root-robustly'
a6b09085 Ninja: Improve internal check for generating at the top-level (#15436)
2015-03-10 09:12:27 -04:00
Brad King fa4617b7ea Merge topic 'configure_file-NEWLINE_STYLE-no-warn'
024e25e4 Tests: Add more signature tests to RunCMake.configure_file test
3ef776fc configure_file: Do not warn about newline style arguments
2015-03-10 09:12:24 -04:00
Brad King 94887cb6f1 cmake: Teach --build to get VCExpress output (#15437)
VCExpress does not produce output if its pipes are connected to
an interactive terminal.  Add a special case to 'cmake --build'
to capture the output through a pipe and re-print it instead of
sharing output pipes with VCExpress.
2015-03-10 08:42:18 -04:00
Oyvind Jensen 18d5a4bcfd VS: Add more Fortran compiler flags to flag table (#15381)
Due to a difference in how AdditionalOptions are implemented in the
Fortran component of VS and the C/C++ component, flags that are not
listed in the flag table are at risk of being overwritten.
2015-03-10 08:40:37 -04:00
Kitware Robot a5505c4c53 CMake Nightly Date Stamp 2015-03-10 00:01:19 -04:00
Stephen Kelly 9e1689413f File(GENERATE): Process genex evaluation files for each language. 2015-03-09 20:49:17 +01:00
Stephen Kelly b734fa4471 Genex: Allow COMPILE_LANGUAGE when processing include directories.
Issue an error if this is encountered by an IDE generator.
2015-03-09 20:49:17 +01:00
Stephen Kelly 0b945ea9a6 Genex: Allow COMPILE_LANGUAGE when processing compile definitions.
Issue an error if this is encountered by an IDE generator.
2015-03-09 20:49:16 +01:00
Stephen Kelly 5c559f1113 Genex: Enable use of COMPILE_LANGUAGE for compile options.
Follow-ups will allow the use of the generator expression
for compile definitions and include directories for non-IDE
generators.
2015-03-09 20:48:57 +01:00
Brad King 244e3d0fc9 Merge branch 'ninja-check-root-robustly' into release 2015-03-09 13:37:15 -04:00
Brad King a6b0908571 Ninja: Improve internal check for generating at the top-level (#15436)
Simply check for whether the local generator has a parent instead of
depending on a string comparison of directory names.
2015-03-09 13:36:46 -04:00
Brad King a6d488f2ce Merge topic 'cbp-unit-targets'
099b0cab CodeBlocks: Declare which source file belongs to which targets.
2015-03-09 09:45:59 -04:00