Commit Graph

26844 Commits

Author SHA1 Message Date
Stephen Kelly 607e19384f Replace 'foo.size() != 0' pattern with !foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly 930bd47816 Replace 'foo.size() == 0' pattern with foo.empty(). 2015-01-18 14:25:24 +01:00
Stephen Kelly d92887efab Replace 'foo.size() > 0' pattern with !foo.empty(). 2015-01-18 14:25:24 +01:00
Kitware Robot f3e92d2816 CMake Nightly Date Stamp 2015-01-18 00:01:09 -05:00
Stephen Kelly 681d965df1 Use the cmDeleteAll algorithm for types derived from std::map. 2015-01-17 16:22:58 +01:00
Stephen Kelly 4dc0c488f9 cmDeleteAll: Generalize deletion specialization for map types.
Assume that a container whose value_type is a std::pair should have
its second member deleted.
2015-01-17 16:22:58 +01:00
Stephen Kelly 782591350c Features: Test presence of cxx_auto_type with genex.
The purpose of that test is to cover the case where the genex
reports '1', and the feature is chosen to be present on all/most
supported compilers.  GNU 4.4 does not support cxx_nullptr.
2015-01-17 16:07:53 +01:00
Stephen Kelly 7b9fc88b04 Features: Remove outdated comment. 2015-01-17 16:07:53 +01:00
Stephen Kelly e11f8d6446 Remove AppleClang-5.1-features.rst release notes.
It is redundant after Xcode-clang-compile-features.rst.
2015-01-17 14:54:48 +01:00
Stephen Kelly 59e6e15cde Help: Add notes for topic 'WriteCompilerDetectionHeader-multi-file-lang' 2015-01-17 14:52:27 +01:00
Stephen Kelly bcb04783f7 Features: Record for SolarisStudio 12.4.
It has similar C++11 capabilities compared to GCC 4.8.
2015-01-17 14:48:28 +01:00
Stephen Kelly 54156d723a WCDH: Generate per-language files in multi-file mode.
Otherwise we generate defines for C/CXX features unguarded by the presence of
the __cplusplus macro and available to the wrong compiler.
2015-01-17 14:48:27 +01:00
Stephen Kelly 536c535cb0 Features: Adjust cxx_variadic_templates unit test for SolarisStudio.
The change in commit 1f19ac4d (Features: Adjust cxx_variadic_templates
unit test for GNU < 4.7., 2015-01-11) pacified GNU 4.6, but leaves
SolarisStudio 12.4 complaining:

 "cxx_variadic_templates.cpp", line 5: Error: Partial specialization for Interface<Is...> has identical arguments.
 1 Error(s) detected.

Implement a preprocessor test for using the partial specialization
workaround needed by GNU 4.6.
2015-01-17 14:48:27 +01:00
Stephen Kelly d84d6ed409 WCDH: Allow compilers to specify features for one language but not the other. 2015-01-17 14:48:27 +01:00
Stephen Kelly 5d57970dd9 Features: Use variable in cxx_inheriting_constructors test.
Avoid warning with SolarisStudio.
2015-01-17 14:48:27 +01:00
Stephen Kelly 7dcdfec97f WCDH: Find a language-specific DetermineCompiler.cmake if present.
The SolarisStudio compiler module uses language specific files.
2015-01-17 14:48:27 +01:00
Stephen Kelly 69182ce4ed Features: Ensure that the cxx_auto_type test is correct.
SolarisStudio considers 'auto' to be a storage class specifier in
C++98 mode (as appropriate), and considers variables without a specified
type to be of type int.  So, it treats

 auto x = 3.14;

as

 auto int x = 3.14;

which in C++98 mode is equivalent to

 int x = 3.14;

and it does not fail to compile as expected.

Change the test to use a reference so that the type must be known.
2015-01-17 14:48:27 +01:00
Kitware Robot f8c416f00c CMake Nightly Date Stamp 2015-01-17 00:01:12 -05:00
Brad King a2dc7f87e0 Merge branch 'FindQt-fixes' into release 2015-01-16 16:07:15 -05:00
Rolf Eike Beer b937f75379 FindQt: explicitely mention that it cannot Qt5 or later 2015-01-16 22:06:22 +01:00
Rolf Eike Beer 6af8cbf214 FindQt: fix variable name in error message 2015-01-16 22:06:21 +01:00
Rolf Eike Beer 49d05a4713 FindQt: fix setting DESIRED_QT_VERSION if "find_package(Qt VVV)" was called
In case the given version was not only "3" or "4", but something like "4.8"
DESIRED_QT_VERSION was set to an unsupported value. While at it also check
that the version passed in is really in the range of 3.x and 4.x. Also
suggest switching to the more specific find modules if possible.
2015-01-16 22:06:21 +01:00
Brad King 99f66e9b4a Merge branch 'fix-cmake-org-links' into release 2015-01-16 15:51:16 -05:00
William Lynch 91fbcda28f Help: Update cmake.org links to avoid redirects
Some links to cmake.org now redirect, so link to the new pages directly.
2015-01-16 15:50:44 -05:00
Brad King 8b7db43bc6 Merge topic 'GNU-4.6-compile-features'
770ba876 Help: Add notes for topic 'GNU-4.6-compile-features'
b15c008f Features: Record for GNU 4.6.
f13a2eb1 Features: Adjust the RunCMake test to use more-common features.
1f19ac4d Features: Adjust cxx_variadic_templates unit test for GNU < 4.7.
0798d1e5 Features: Extend the generalized_initializers test for GNU < 4.7.
938bd94e Features: Test __GXX_EXPERIMENTAL_CXX0X__ macro for GNU < 4.7 compatibility.
462c630b Features: Don't test __cplusplus value for CXX98 on GNU.
222ec86f Features: Test an old value of __STDC_VERSION__ for GNU < 4.7 compatibility.
6e909035 Features: Record C/CXX dialect flags for GNU 4.6.
bfc995cc Features: Remove wrong content from else() condition.
1532b921 Features: Make cxx_noexcept available from GNU 4.6.
1f4649e6 Features: Update the default_dialect test for old GNU-like compilers.
a60027a6 Features: Ensure appropriate return value from feature test macros.
2015-01-16 11:07:14 -05:00
Brad King ba7227a0af Merge topic 'extend-COMPILE_FEATURES-test'
06ff5254 Features: Extend the tests for the COMPILE_FEATURES genex.
2015-01-16 11:07:12 -05:00
Brad King 770ba87699 Help: Add notes for topic 'GNU-4.6-compile-features' 2015-01-16 10:54:27 -05:00
Brad King 287070ceb8 Merge topic 'windows-utf-8'
cdc29c36 Encoding:  Switch to use UTF-8 internally by default on Windows.
2015-01-16 09:44:01 -05:00
Brad King 36428fc527 Merge topic 'fix-qcc-compiler-id'
9c9bc712 QNX: Fix detection of QCC compiler id (#15349)
2015-01-16 09:43:59 -05:00
Brad King c15a2fdd2e Merge topic 'tests-RunCMake-report-command'
6c121924 Tests: Teach RunCMake to report command-line on failure
2015-01-16 09:43:56 -05:00
Brad King 3cca39b46d Merge topic 'libarchive-constify-internal-get_date'
6b9a0e17 libarchive: Constify internal __archive_get_date implementation
2015-01-16 09:43:54 -05:00
Brad King 9d4ef58462 Merge topic 'import-jsoncpp'
89cd3d27 jsoncpp: Add README-CMake.txt
7e310624 jsoncpp: Provide 'isfinite' implementation on Solaris
4c496065 jsoncpp: Provide 'isfinite' implementation on ancient glibc
50032bc8 jsoncpp: Add missing assert before strcmp in json_value.cpp
ad94b052 jsoncpp: Add missing <iosfwd> include in json/writer.h
7eba04fd jsoncpp: Include C headers since we use APIs without std::
06f41e98 jsoncpp: Disable warnings to avoid changing 3rd party code
1fc55653 jsoncpp: Build the library within CMake
84d5674d jsoncpp: Include "config.h" before system headers
a263d519 Merge branch 'jsoncpp-upstream' into import-jsoncpp
53f6ccb0 JsonCpp 1.0.0 (reduced)
32fd56b0 jsoncpp: Add .gitattributes to skip whitespace checks
2015-01-16 09:43:52 -05:00
Brad King cc475e8129 Merge topic 'ExternalData-custom-download'
829fc5ad Help: Add notes for topic 'ExternalData-custom-download'
0fe4d8bb ExternalData: Add support for custom download scripts
945571db ExternalData: Improve documentation organization
a32b2245 ExternalData: Re-order documentation
531e75e0 ExternalData: Document all variables defined by module
f3884b47 ExternalData: Split documentation into sections
4ab5c652 ExternalData: Convert docs to a bracket comment
2015-01-16 09:43:49 -05:00
Brad King ed4b95e12f Merge topic 'fix-ctest_build-output-processing-regression'
509f2713 ctest_build: Fix logic regression in parent that clips build output
2015-01-16 09:43:46 -05:00
Clinton Stimpson cdc29c3608 Encoding: Switch to use UTF-8 internally by default on Windows.
This fixes several reported bugs about CMake not handling
non-ascii paths on Windows.

Practically, the use of some unicode characters may still
be limited by the build or compiler tools.

For example, a user may be limited by the build tools to
using characters within the Windows ANSI code page (which can
include non-ascii characters in the current system language).
2015-01-16 09:39:32 -05:00
Brad King 8741991e4b Merge branch 'release-3.0' into release 2015-01-16 09:04:02 -05:00
Brad King 9a92734cdd Merge branch 'eclipse-fix-cxx-natures' into release-3.0 2015-01-16 08:55:02 -05:00
André Klitzing 6e6e0c4048 Eclipse: Add org.eclipse.cdt.core.cnature to CXX projects (#15068)
Since commit v3.0.0-rc1~335^2~1 (eclipse: Add natures for Eclipse based
on enabled languages, 2013-08-29) CXX projects got only "ccnature", but
Eclipse itself also adds "cnature" when creating C++ projects.  Fix this
by adding both for CXX projects.
2015-01-16 08:54:39 -05:00
Kitware Robot fb354cc59c CMake Nightly Date Stamp 2015-01-16 00:01:16 -05:00
Stephen Kelly b15c008fac Features: Record for GNU 4.6.
Adjust the CompileFeatures genex_test for the expectation of the
OVERRIDE_CONTROL feature group.
2015-01-16 00:11:01 +01:00
Stephen Kelly f13a2eb118 Features: Adjust the RunCMake test to use more-common features. 2015-01-16 00:11:01 +01:00
Stephen Kelly 1f19ac4da5 Features: Adjust cxx_variadic_templates unit test for GNU < 4.7.
The unit test for this fails with GNU 4.6:

 Building CXX object CMakeFiles/test_cxx_variadic_templates.dir/cxx_variadic_templates.cpp.o
   CompileFeatures/cxx_variadic_templates.cpp: In static member function ‘static int Interface<I, Is>::accumulate()’:
   CompileFeatures/cxx_variadic_templates.cpp:18:31: sorry, unimplemented: cannot expand ‘Is ...’ into a fixed-length argument list
 CMakeFiles/test_cxx_variadic_templates.dir/build.make:54: recipe for target 'CMakeFiles/test_cxx_variadic_templates.dir/cxx_variadic_templates.cpp.o' failed

The workaround is to use a specialization:

 http://stackoverflow.com/questions/1989552
 http://stackoverflow.com/questions/11297376
2015-01-15 22:13:22 +01:00
Stephen Kelly 0798d1e5b0 Features: Extend the generalized_initializers test for GNU < 4.7.
That compiler requires a different initializer_list constructor, so
update the test to match.
2015-01-15 22:13:22 +01:00
Stephen Kelly 938bd94eb0 Features: Test __GXX_EXPERIMENTAL_CXX0X__ macro for GNU < 4.7 compatibility. 2015-01-15 22:13:22 +01:00
Stephen Kelly 462c630b8a Features: Don't test __cplusplus value for CXX98 on GNU.
The macro is defined to 1 for GNU 4.6, and such a test is only
useful for features in language dialects newer than the
default (CXX98 for GNU currently).

Test only that it has a truthy value.
2015-01-15 22:13:22 +01:00
Stephen Kelly 222ec86f7d Features: Test an old value of __STDC_VERSION__ for GNU < 4.7 compatibility. 2015-01-15 22:13:22 +01:00
Stephen Kelly 6e909035af Features: Record C/CXX dialect flags for GNU 4.6.
This release was prior to standardization of C11/CXX11.
2015-01-15 22:13:22 +01:00
Stephen Kelly bfc995cc3b Features: Remove wrong content from else() condition.
As this is not elseif(), the content has no effect.

Rather than changing it to an elseif(), remove the conditional content.
All versions of GNU prior to 5.0 default to C90/89.

Clang-C.cmake has a similar code block which correctly uses
elseif() for setting the default C dialect to C99.  That may have
been updated from a C90 default at some point, so leave the
version condition there in place for now.
2015-01-15 22:13:22 +01:00
Stephen Kelly 1532b9214f Features: Make cxx_noexcept available from GNU 4.6.
As listed in the reference document.
2015-01-15 22:13:22 +01:00
Stephen Kelly 1f4649e62f Features: Update the default_dialect test for old GNU-like compilers.
Prior to GNU 4.7, GNU defined __cplusplus incorrectly, and defined
__GXX_EXPERIMENTAL_CXX0X__ in C++11 mode.
2015-01-15 22:13:22 +01:00