Commit Graph

17912 Commits

Author SHA1 Message Date
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 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
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