Commit Graph

18041 Commits

Author SHA1 Message Date
Stephen Kelly 846608f267 cmMakefile: Remove useless condition. 2015-04-18 15:29:17 +02:00
Stephen Kelly a2f2aeee2f cmMakefile: Add wrapper for reading listfiles which have an origin.
Such files are delegates from other files, and so they set the
CMAKE_PARENT_LIST_FILE to the originator.  They also may set a
policy scope.
2015-04-18 15:29:17 +02:00
Stephen Kelly 68f791cd06 cmMakefile: Add a method for processing buildsystem files.
These are different from other ListFiles in that a project() command is
required if it is top-level.
2015-04-18 15:29:17 +02:00
Stephen Kelly 5bb4248a80 cmMakefile: Remove fullPath parameter from ReadListFile.
There is no reason for this to be a responsibility of
ReadListFile.  Additionally, the only user of it already computes
it itself.
2015-04-18 15:29:17 +02:00
Stephen Kelly fc7ab8874b CPack: Read the config listfile in the normal way.
This is a unique function call in CMake, and it was likely a
programming error when introduced.  All other similar calls to
ReadListFile use a null first paramter.

The effect of this patch is to no-longer define CMAKE_PARENT_LIST_FILE
to the config file itself while evaluating it.

The ReadListFile method also no longer hits a condition that it uses
CollapseFullPath on the input file.  However, as cpack does not
set the StartDirectory anyway, this has no effect. See bug 15522.
2015-04-18 15:26:12 +02:00
Kitware Robot a0bc4a999d CMake Nightly Date Stamp 2015-04-18 00:01:06 -04:00
Gregor Jasny 6693590f81 Xcode: Refine quoting rules for Strings
$ and . do not need to be quoted, but brackets and * must be to
not confuse the Xcode parser.
2015-04-17 21:50:05 +02:00
Gregor Jasny a6331eb851 Xcode: Let PrintComment decide if the comment is non-empty 2015-04-17 21:50:05 +02:00
Gregor Jasny 6e8952c193 Xcode: PrintComment will prepend a whitespace itself before the comment 2015-04-17 21:50:05 +02:00
Gregor Jasny 4bd2544b25 Xcode: Do not add whitespace after attribute group opening brace
This suppresses the extra space that would be generated if the
separator is a space. The conditional block is also used in this
form elsewhere.
2015-04-17 21:50:04 +02:00
Gregor Jasny 5cb4c8380d Xcode: Properly indent PBXFileReference and PBXBuildFile
Move indent factor change behind indention of start-of-line.
2015-04-17 21:50:04 +02:00
Gregor Jasny a723427b64 Xcode: Remove extra space in PBXProject comment 2015-04-17 21:50:04 +02:00
Gregor Jasny 2fe8bca580 Xcode: Add comment after root object 2015-04-17 21:50:04 +02:00
Gregor Jasny 2e0e205e28 Xcode: Indent using tabs 2015-04-17 21:50:04 +02:00
Gregor Jasny 7b68c8df6b Xcode: Sort Xcode objects by Id
this patch series aims to minimize deltas between the CMake Xcode
generator and Xcode itself. It was started by the observation that
if one makes any change to the project within Xcode (e.g. to see
how a variable is called internally) the user cannot diff the CMake
project and the one stored by Xcode afterwards.

Xcode keeps the objects ordered by the object id.
Because cmake stores them into an unordered container
at creation time they must be sorted before writing the
pbxproj file.

I tested this series with Xcode 6.3 and Xcode 3.2. Both show a
reduced diff after this series was applied.
2015-04-17 21:49:05 +02:00
Brad King 1f1b62b0e2 Merge topic 'cpack-one-component-only'
ed0b0630 CPack: Fix single component packaging
2015-04-17 10:50:15 -04:00
Brad King 9efee16a7a Merge topic 'ninja-autogen'
e8fdd5f1 QtAutogen: Workaround rcc CRCRLF newlines on Windows (#15459)
15f1a6b4 Tests/QtAutogen: Avoid touching files in the source tree
3f7c7c65 Tests/QtAutogen: Help Qt5Autogen test find Qt5 on Windows
26b5cc5e Tests/QtAutogen: Enable per-config source tests when possible
45566408 Tests/QtAutogen: Require CMake 3.1 to set policies everywhere
2015-04-17 10:50:13 -04:00
Kitware Robot a4d201a747 CMake Nightly Date Stamp 2015-04-17 00:01:05 -04:00
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