Commit Graph

18023 Commits

Author SHA1 Message Date
Raffi Enficiaud ed0b063085 CPack: Fix single component packaging
Refine logic added in commit 0ffd3534 (CPack single component packaging,
2015-04-02).  Component packaging should be enabled if either at least
one component or one group is set and should not require both.
2015-04-16 16:29:33 -04:00
Brad King e8fdd5f12a QtAutogen: Workaround rcc CRCRLF newlines on Windows (#15459)
The 'rcc --list' operation may print newlines of the form CRCRLF,
so strip any trailing CR characters found on each line.

Update the Tests/QtAutogen test to use a resource named in a
subdirectory.  This causes 'rcc --list' to display a blank line
and tests that it is correctly filtered out.
2015-04-16 15:10:40 -04:00
Brad King 2ee128d9c8 Merge topic 'vs10-no-macros'
885ab9ab VS: Drop reload macros for VS >= 10 (#11258,#14680)
2015-04-16 09:58:50 -04:00
Brad King ab033b0789 Merge topic 'vs70-deprecate'
7b8e7c4a Deprecate Visual Studio 7 generator (.NET 2002)
2015-04-16 09:58:48 -04:00
Brad King 5a45497fc1 Merge topic 'vs6-deprecate'
85c2626b Deprecate Visual Studio 6 generator
2015-04-16 09:58:45 -04:00
Kitware Robot 532644ea14 CMake Nightly Date Stamp 2015-04-16 00:01:04 -04:00
Brad King 8469b6f694 Merge topic 'port-global-properties-to-cmState'
5d056c0d Port Global property interaction to cmState.
de722d7d Move property initialization to cmState.
9b5f80a8 Move global properties to cmState.
0076b5d8 cmake: Remove the happy global property scope pattern.
24b7f31d cmake: Remove unused cmCommand methods.
0aec4913 Port cmCommand consumers to cmState.
96f8c5f9 cmState: Move cmCommand-related methods from cmake class.
97e53ebb cmake: Simplify command clean up loop.
1e738bcf cmake: Simplify RemoveUnscriptableCommands algorithm.
62854e99 cmState: Move try_compile state from cmake class.
db8425be cmake: Get enabled languages from cmState.
74de9a73 cmGlobalGenerator: Delegate storage of enabled languages to cmState.
b159bff7 Move property definition to cmState.
2015-04-15 11:46:17 -04:00
Brad King fc579b91e0 Merge topic 'doc-ninja-non-experimental'
9ac05683 Ninja: Drop 'experimental' label in documentation
2015-04-15 11:46:12 -04:00
Stephen Kelly 5d056c0dd8 Port Global property interaction to cmState. 2015-04-15 11:43:50 -04:00
Stephen Kelly de722d7d63 Move property initialization to cmState. 2015-04-15 11:43:50 -04:00
Stephen Kelly 9b5f80a83c Move global properties to cmState. 2015-04-15 11:43:50 -04:00
Stephen Kelly 0076b5d834 cmake: Remove the happy global property scope pattern.
Global properties are already global in scope, so remove the
overload for specifying it and port users of the API.

The call from cmMakefile::GetProperty can be simplified because
the scope is only used during chaining, and there is no further
chaining after processing global properties.
2015-04-15 11:43:50 -04:00
Stephen Kelly 24b7f31d3a cmake: Remove unused cmCommand methods. 2015-04-15 11:43:50 -04:00
Stephen Kelly 0aec491328 Port cmCommand consumers to cmState. 2015-04-15 11:43:49 -04:00
Brad King 885ab9ab37 VS: Drop reload macros for VS >= 10 (#11258,#14680)
We never implemented them for VS 11 (2012), 12 (2013), or 14 (2015).
For VS 10 (2010) the reload macro does not work correctly when run from
inside a build launched through the IDE because stopping the build kills
the CMake that is driving the reload.  Fortunately VS >= 10 know how to
reload the whole solution anyway.
2015-04-15 09:58:42 -04:00
Brad King 7b8e7c4ac3 Deprecate Visual Studio 7 generator (.NET 2002)
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2015-04-15 09:21:24 -04:00
Brad King 85c2626bab Deprecate Visual Studio 6 generator
Update documentation to mark the generator deprecated.  Add a warning at
the end of generation plus an option to turn off the warning.
2015-04-15 09:08:57 -04:00
Kitware Robot ff742f6823 CMake Nightly Date Stamp 2015-04-15 00:01:05 -04:00
Brad King 9ac0568390 Ninja: Drop 'experimental' label in documentation
This generator is no longer experimental and has been fairly
mature for several releases already.
2015-04-14 13:14:50 -04:00
Kitware Robot cdc53b62c2 CMake Nightly Date Stamp 2015-04-14 00:01:06 -04:00
Stephen Kelly 96f8c5f9a3 cmState: Move cmCommand-related methods from cmake class. 2015-04-13 21:12:14 +02:00
Stephen Kelly 97e53ebb3c cmake: Simplify command clean up loop. 2015-04-13 21:11:23 +02:00
Stephen Kelly 1e738bcf9c cmake: Simplify RemoveUnscriptableCommands algorithm.
Remove obsolete RemoveCommand method.
2015-04-13 21:10:19 +02:00
Stephen Kelly 62854e9966 cmState: Move try_compile state from cmake class. 2015-04-13 20:27:36 +02:00
Stephen Kelly db8425be18 cmake: Get enabled languages from cmState.
The check for a global generator is redundant - the enabled
languages are only populated by the global generator.
2015-04-13 20:27:36 +02:00
Stephen Kelly 74de9a734c cmGlobalGenerator: Delegate storage of enabled languages to cmState. 2015-04-13 20:19:58 +02:00
Stephen Kelly b159bff732 Move property definition to cmState. 2015-04-13 20:13:13 +02:00
Brad King 62c5e6f1a1 Merge topic 'introduce-cmState'
f081c5bd cmState: Move CacheEntryType enum from cmCacheManager.
f71fdf0e cmMakefile: Remove unused CacheManager accessor.
ff7169a0 Port to cmState.
a6b1ad13 Introduce cmState class.
2015-04-13 11:45:02 -04:00
Stephen Kelly f081c5bddd cmState: Move CacheEntryType enum from cmCacheManager. 2015-04-13 11:44:16 -04:00
Stephen Kelly f71fdf0ec8 cmMakefile: Remove unused CacheManager accessor.
Remove unneeded friend declarations from cmCacheManager.
2015-04-13 11:44:15 -04:00
Stephen Kelly ff7169a03c Port to cmState. 2015-04-13 11:44:15 -04:00
Stephen Kelly a6b1ad1309 Introduce cmState class.
At this point, it is an interface to the cache.  It will be extended
to be a universal interface for access to and manipulation of
configuration-time data (defintions, properties on targets,
directories, source files etc).

This will allow porting all command implementations away
from the cmMakefile and cmTarget classes, and result in something
more-purely related to configuration-time processing of cmake
commands.  That should serve at least the following goals:

 * Split the CMake implementation more definitively into three
   stages: Configuration, computation and generation, and be able to
   implement each optimally for memory access patterns etc.
 * Make better IDE integration possible by making more configuration
   data available.
 * Make it possiblte to use a smaller library than CMakeLib.a in
   cpack and ctest, resulting in smaller executables.
 * Make it possible to run the configure step multiple times in
   the same CMake run (#14539).

Manage its lifetime in the cmake class, and add a convenience accessor
to cmMakefile.
2015-04-13 11:44:14 -04:00
Brad King 92d6179893 Merge topic 'cmake-cleanups'
07d44d63 cmake: Remove confusing duplication.
ea819b29 cmMakefile: Remove unused method.
6ad86c7f cmMakefile: Remove bad comment.
fca2b542 cmMakefile: Internalize setting of CMakeInstance on Properties.
7bb4e3db cmMakefile: Out-of-line Home directory accessors.
6241253a cmake: Out-of-line Home and Start directory methods.
0ee3ccb3 cmake: Fix variable name bugs.
57dd094e Use vector, not list for cmCommand storage.
6deb43e6 Remove some files which do not need to be in BootstrapCommands.
ecdb1b3b Add some missing includes.
04b307b9 cmake: Simplify CommandExists method.
0f1f324b cmake: Rename oddly named variables.
275185ac cmake: Constify GetCommand method.
c57f086a cmake: Don't lower-case a string needlessly.
23368c9b cmake: Use make_pair instead of Foo::value_type.
14c70b8c cmake: out-of-line try compile state methods.
...
2015-04-13 11:38:20 -04:00
Brad King e0adfe6112 Merge topic 'custom-command-multiple-outputs'
9660a3cc Makefile: Fix multiple custom command outputs with one missing
5c08e255 KWSys SystemTools: Teach Touch with !create to succeed on missing file
2015-04-13 09:06:07 -04:00
Brad King 1862b39868 Merge topic 'cmake-G-print-generators'
588dcb33 cmake: Provide guidance when an invalid -G option is given
2015-04-13 09:05:16 -04:00
Brad King bf5028f88d Merge topic 'c-locale-messages'
a198839a CTest: Fix locale used for VCS updates
2015-04-13 09:05:12 -04:00
Brad King 2cf5415d9f Merge topic 'update-kwsys'
e5388583 Merge branch 'upstream-kwsys' into update-kwsys
d34d5a37 KWSys 2015-04-10 (69bccf2e)
2015-04-13 09:05:06 -04:00
Brad King e538858349 Merge branch 'upstream-kwsys' into update-kwsys 2015-04-13 09:01:59 -04:00
Nils Gladitz a198839a7b CTest: Fix locale used for VCS updates
6a661f0603 fixed the
locale used for message output but at the same time broke the locale
used for filename encodings.

This commit preserves LC_CTYPE in the presence of LC_ALL.
2015-04-13 08:59:34 -04:00
Kitware Robot 74c8b92844 CMake Nightly Date Stamp 2015-04-13 00:01:04 -04:00
Stephen Kelly 07d44d638b cmake: Remove confusing duplication. 2015-04-12 23:10:45 +02:00
Stephen Kelly ea819b29f8 cmMakefile: Remove unused method. 2015-04-12 23:10:45 +02:00
Stephen Kelly 6ad86c7fc4 cmMakefile: Remove bad comment. 2015-04-12 23:10:45 +02:00
Stephen Kelly fca2b542b4 cmMakefile: Internalize setting of CMakeInstance on Properties. 2015-04-12 23:10:45 +02:00
Stephen Kelly 7bb4e3db06 cmMakefile: Out-of-line Home directory accessors. 2015-04-12 23:10:44 +02:00
Stephen Kelly 6241253a4b cmake: Out-of-line Home and Start directory methods. 2015-04-12 23:10:44 +02:00
Stephen Kelly 0ee3ccb3b0 cmake: Fix variable name bugs. 2015-04-12 23:10:44 +02:00
Stephen Kelly 57dd094ede Use vector, not list for cmCommand storage. 2015-04-12 20:09:47 +02:00
Stephen Kelly 6deb43e6c8 Remove some files which do not need to be in BootstrapCommands. 2015-04-12 20:09:31 +02:00
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