Commit Graph

3509 Commits

Author SHA1 Message Date
Brad King d891d47434 Tests: Consolidate detection of 'rpmbuild'
Several tests use slight variations of the same logic to enable CPack
RPM tests.  Consolidate this logic into one check before any tests are
added.  Look for 'rpmbuild' only on Linux and only when the test build
tree does not have spaces in the path.  In particular, this will make
the result available in time for the RunCMake.CPackRPM test to be
activated even if CMake is configured exactly once.
2015-02-13 11:50:38 -05:00
Gregor Jasny bf8f9c29e7 Xcode: Teach XCODE_ATTRIBUTE target properties about generator expressions
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2015-02-12 13:35:31 -05:00
Brad King f30022eb07 install: Allow generator expressions in TARGETS DESTINATION (#14317)
This will allow per-config destinations for targets in EXPORT sets.
Using multiple install(TARGETS) with separate CONFIGURATIONS is
rejected as a target appearing more than once in an export set.
Now instead one can write

 install(TARGETS foo EXPORT exp DESTINATION lib/$<CONFIG>)

to get a single logical membership of the target in the export set
while still having a per-config destination.
2015-02-11 15:15:33 -05:00
Brad King 108e94ecf1 Merge topic 'export-interface-source-files'
f7e33820 Add release notes for export-interface-source-files.
6da65b39 Allow export of targets with INTERFACE_SOURCES.
736bcb96 Tests: Move IfacePaths test stderr files.
d9f8390d Tests: Run IfacePaths tests with a parameter.
cc152094 Tests: Split part of include_directories test to a generic location.
2015-02-11 09:59:30 -05:00
Stephen Kelly 6da65b3907 Allow export of targets with INTERFACE_SOURCES.
Use the same rules for paths in source and binary dirs in
installed INTERFACE_SOURCES as are used for
INTERFACE_INCLUDE_DIRECTORIES.
2015-02-11 00:51:34 +01:00
Stephen Kelly 736bcb9664 Tests: Move IfacePaths test stderr files.
Rename the files with a property-specific name, so that additional
properties can be easily tested.
2015-02-11 00:51:30 +01:00
Brad King 2fd44b082b Merge topic 'test-RunCMake-updates'
c0d8e715 RunCMake: Allow specifying the stderr file for a test.
68d29f51 RunCMake: Allow specifying the directory to run tests in.
1c3918ff RunCMake: Remove unneeded files.
2015-02-10 10:09:47 -05:00
Brad King db9a2e8966 Merge topic 'no-global-setlocale'
0f870234 Merge branch 'backport-no-global-setlocale' into no-global-setlocale
cd408d93 Add setlocale() calls around use of libarchive APIs (#14934, #15377)
87be2e14 Do not call setlocale() globally in CMake applications (#15377)
2015-02-10 09:37:50 -05:00
Stephen Kelly d9f8390db6 Tests: Run IfacePaths tests with a parameter.
Run the tests for the INCLUDE_DIRECTORIES INTERFACE property
in a specific build location, and update the stderr expectation
to match the new output.
2015-02-09 19:34:27 +01:00
Stephen Kelly cc15209476 Tests: Split part of include_directories test to a generic location.
The moved tests are related to paths in INTERFACE_INCLUDE_DIRECTORIES
in general, and when exporting, and covering cases of the install
location being within the build or source prefix etc.  Other build
properties containing paths should have similar tests, so this
allows some parameterization while keeping the preparation of the
various directory structures.
2015-02-09 19:23:47 +01:00
Stephen Kelly c0d8e71591 RunCMake: Allow specifying the stderr file for a test. 2015-02-09 19:15:04 +01:00
Stephen Kelly 68d29f5190 RunCMake: Allow specifying the directory to run tests in. 2015-02-09 19:15:04 +01:00
Stephen Kelly 1c3918ff02 RunCMake: Remove unneeded files.
The default expectation of RunCMake tests is empty content, so there
is no need to specify it.
2015-02-09 19:15:04 +01:00
Brad King 0f870234fe Merge branch 'backport-no-global-setlocale' into no-global-setlocale
Resolve conflict in Source/CMakeLists.txt by taking both changes.
2015-02-06 13:35:21 -05:00
Brad King 87be2e1427 Do not call setlocale() globally in CMake applications (#15377)
Revert the changes made by commit v3.1.0-rc1~406^2~1 (Encoding: Add
setlocale() to applications, 2014-05-30) and commit v3.1.0-rc1~406^2
(Encoding: Change to only set LC_CTYPE, 2014-06-11), and other setlocale
calls added later in their spirit.  CMake has not been taught how to
deal with non-C locales everywhere.  We do not define any functionality
for character conversions for non-ASCII strings.  Another solution will
be needed to address the original problem motivating addition of
setlocale() calls.
2015-02-06 13:32:26 -05:00
Brad King 54e900abfb CheckFortranCompilerFlag: Add test case
Extend the FortranOnly test with a case covering this module.
2015-02-05 11:18:13 -05:00
Brad King 9042c875dc Merge topic 'fix-C-standard-features'
fb3487a9 Features: Fix C90 feature detection.
6027798a Features: Allow setting standard dialect below the default.
9d767810 Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers.
72537e44 Features: Add dialect compile flags only if default is known.
82c9d686 AppleClang: Remove redundant UNIX condition.
2015-02-05 09:25:14 -05:00
Stephen Kelly fb3487a997 Features: Fix C90 feature detection.
This bug caused c_function_prototypes to not be recorded at configure
time when compiling with -std=gnu99 or similar. In the case of feature
recording, that was not a problem, because the logic in
CMakeDetermineCompileFeatures.cmake currently assumes that a feature
present for an earlier standard is present for a later standard.

However, the detection strings are also used in WriteCompilerDetectionHeader,
so the feature macro has been defined to '0' when using a later language
dialect.

Fix that by not checking the existence of the __STDC_VERSION__ macro at
all when detecting C90 features.
2015-02-04 18:38:21 -05:00
Brad King 8f82004368 Merge topic 'CTestCoverageCollectGCOV-refinements'
809a5a5e Help: Add notes for topic 'CTestCoverageCollectGCOV-refinements'
03c0812c CTestCoverageCollectGCOV: Fix handling of international characters
8caa4e72 CTestCoverageCollectGCOV: Add test case
5c828cc8 CTestCoverageCollectGCOV: Allow custom flags to gcov
30cb628e CTestCoverageCollectGCOV: Fix handling of large file counts
2015-02-04 12:30:10 -05:00
Bill Hoffman 8caa4e72ab CTestCoverageCollectGCOV: Add test case 2015-02-03 10:40:58 -05:00
Brad King aec11372a5 Merge topic 'rpm_multi_prefix'
3ec02547 CPackRPM: Allow multiple path relocation prefixes for one package
2015-02-03 09:46:21 -05:00
Robert Maynard d3489bdb0b Features: Record for MSVC 2010-2015
Also, in WCDH add MSVC Compatibility for cxx_align{of,as}.

Co-Author: Stephen Kelly <steveire@gmail.com>
Co-Author: Brad King <brad.king@kitware.com>
2015-01-30 09:57:33 -05:00
Brad King 3228fc5049 Features: Define meaning for no language standard default
Define an empty string in CMAKE_<LANG>_STANDARD_DEFAULT to mean that
the toolchain has no notion of lanuage standard levels.  In this case
the <LANG>_STANDARD[_REQUIRED] properties will have no effect.

Update the RunCMake.CompileFeatures test to exclude the
LinkImplementationFeatureCycle test when there is no standard default.
It can never fail because no use of specific features will adjust the
CXX_STANDARD level required for any target since the standard levels
have no meaning in this case.
2015-01-29 15:01:40 -05:00
Domen Vrankar 3ec0254727 CPackRPM: Allow multiple path relocation prefixes for one package 2015-01-29 10:48:58 -05:00
Brad King 326cfe2b30 Merge topic 'xcode-revise-make-program'
ab9fa54d Xcode: Switch to internal CMAKE_MAKE_PROGRAM lookup by generator (#15324)
11e2e6ca Xcode: Select make program at build time
e4055a61 Xcode: Add internal API to find xcodebuild
2015-01-29 09:14:00 -05:00
Brad King 98659aecfd Merge topic 'vs-shader-flags'
4775c901 VS: Add source file property to set extra hlsl shader flags
2015-01-29 09:13:58 -05:00
Brad King abec4213d6 Merge topic 'fix-OBJECT_DEPENDS-after-path-normalization'
9259d778 Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
2015-01-29 09:13:53 -05:00
Brad King ab9fa54d48 Xcode: Switch to internal CMAKE_MAKE_PROGRAM lookup by generator (#15324)
The "cmakexbuild" wrapper is not needed for Xcode 4 and above, and the
path to it may change when CMake moves.  Avoid storing a specific path
to a build program in CMakeCache.txt and instead compute the value for
CMAKE_MAKE_PROGRAM on demand.  However, if a user does set the value
explicitly then honor it.

This does for Xcode what commit v3.0.0-rc1~260^2~4 (VS: Switch to
internal CMAKE_MAKE_PROGRAM lookup by generators, 2013-11-15) did for
Visual Studio generators.
2015-01-29 09:11:11 -05:00
Brad King 6a0a4079ef Merge topic 'shorten-test-paths'
70c50962 Tests: Shorten paths in ExternalProjectLocal
539c5c25 Tests: Shorten paths in RunCMake.CompileFeatures
494f6e8d Tests: Shorten paths in CompileDefinitions
2015-01-28 09:33:38 -05:00
Robert Goulet 4775c90145 VS: Add source file property to set extra hlsl shader flags
Create a VS_SHADER_FLAGS source file property so that we can set all
other Visual Studio .hlsl shader file compilation flags.
2015-01-28 09:29:50 -05:00
Brad King 9259d77881 Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
Custom command path normalization added in commit v3.1.0-rc1~471^2
(add_custom_command: Normalize OUTPUT and DEPENDS paths, 2014-05-28)
broke use of OBJECT_DEPENDS to bring in custom commands because the
latter paths were not normalized too.  Normalize them and add a test
case.

Reported-by: Daniel v. Gerpen
2015-01-28 09:06:21 -05:00
Brad King a47b904db2 Merge topic 'file-strings-utf-16'
1f77a700 file: Teach STRINGS to support UTF-16 and UTF-32 encodings
2015-01-27 11:36:45 -05:00
Justin Borodinsky 1f77a7001b file: Teach STRINGS to support UTF-16 and UTF-32 encodings 2015-01-27 11:30:26 -05:00
Brad King c1f5d6e6f5 Merge topic 'test-features-enforce-expectation'
67e76e82 Features: Fix test to reject missing expectation definitions
3046be77 Features: Emit a test failure if 'override' is present but not expected
2015-01-27 11:22:12 -05:00
Brad King af9cf04647 Merge topic 'cmake-E-tar-files-from'
44fd71de cmake: Teach "-E tar" command a "--files-from=" option
2015-01-27 11:22:08 -05:00
Brad King 33daec1ae9 Merge topic 'test-rerun-cmake'
7f2dc8dc configure_file: Test that CMake re-runs on input change or output missing
daf95a38 try_compile: Test that CMake re-runs on input change
2015-01-27 11:22:06 -05:00
Brad King 34ce0dd22f Merge topic 'tests-RunCMake-normalize-newlines'
bf05938b Tests/RunCMake: Normalize newlines before checking actual output
2015-01-27 11:22:04 -05:00
Brad King 7f2dc8dc54 configure_file: Test that CMake re-runs on input change or output missing
With the Makefile generators we expect that touching or modifying the
input file of a configure_file, or removing its output, will cause CMake
to re-run on the next build.  Extend the RunCMake.configure_file test
with a case covering this.  Also check that CMake does not re-run if
nothing has changed.
2015-01-27 11:18:37 -05:00
Brad King bf05938b8f Tests/RunCMake: Normalize newlines before checking actual output
We read the expected output with file(STRINGS) which converts CRLF
newlines to LF.  Do the same with the actual output before comparing.
2015-01-27 11:18:36 -05:00
Brad King daf95a3827 try_compile: Test that CMake re-runs on input change
With the Makefile and Ninja generators we expect that touching the input
source file for a try_compile will cause CMake to re-run on the next
build.  Extend the RunCMake.try_compile test with a case covering this.
Also check that CMake does not re-run if nothing has changed.
2015-01-27 11:18:36 -05:00
Brad King 70c50962fb Tests: Shorten paths in ExternalProjectLocal
Use a shorter name for the external project base directory to
allow longer CMake build tree directory names on Windows.
2015-01-27 08:57:57 -05:00
Brad King 67e76e82df Features: Fix test to reject missing expectation definitions
Whenever feature support is added to a compiler, the CompileFeatures
test needs to be updated to set expected availability of features.
Add #error directives to ensure the test fails if expectations are
not set.

Suggested-by: Stephen Kelly <steveire@gmail.com>
2015-01-26 14:41:33 -05:00
Stephen Kelly 3046be7784 Features: Emit a test failure if 'override' is present but not expected 2015-01-26 14:41:33 -05:00
Brad King 44fd71decb cmake: Teach "-E tar" command a "--files-from=" option
Read file names from the lines of a specified file.  Reject input lines
starting in '-' to leave room for option parsing to be added later.  Add
just '--add-file=' now to allow files starting in '-' to be specified.
2015-01-26 13:28:31 -05:00
Brad King 19e57a48cd Merge topic 'tests-RunCMake-make-program'
23bf98fc Tests/RunCMake: Honor CMAKE_MAKE_PROGRAM
2015-01-26 10:28:30 -05:00
Brad King 8def82585c Merge topic 'try-run-link-libraries'
d0adcccb try_run: Add tests for LINK_LIBRARIES with mock libraries.
223c5cb7 try_run: Add test for bad link libraries.
e2b1f058 try_run: Add support for LINK_LIBRARIES option.
2015-01-26 10:28:25 -05:00
Matt McCormick d0adcccbf4 try_run: Add tests for LINK_LIBRARIES with mock libraries.
Extend the ExportImport test to try using an imported library with
try_run.
2015-01-26 10:05:59 -05:00
Matt McCormick 223c5cb70b try_run: Add test for bad link libraries.
Based off the corresponding try_compile test.
2015-01-26 10:05:30 -05:00
Matt McCormick e2b1f0583f try_run: Add support for LINK_LIBRARIES option.
Most functionality is already implemented in Source/cmCoreTryCompile.{h,cxx}.
Document and improve argument parsing.

This functionality is already being used by a number of modules, like
CheckCSourceCompiles.cmake, but it is not documented.
2015-01-26 10:05:26 -05:00
Brad King 539c5c252e Tests: Shorten paths in RunCMake.CompileFeatures
Shorten the NotAFeature_OriginDebug_target_compile_features case name to
avoid creating really long paths that fail with some tools on Windows.
2015-01-26 08:30:57 -05:00
Brad King 494f6e8d5b Tests: Shorten paths in CompileDefinitions
Shorten the add_definitions command test directory and target names to
avoid creating really long paths that fail with some tools on Windows.
While at it, remove unnecessary project() command calls.
2015-01-25 08:12:12 -05:00
Brad King 23bf98fc04 Tests/RunCMake: Honor CMAKE_MAKE_PROGRAM
If tests are using an explicit make program, pass it through to RunCMake
tests so that any that actually do build use the expected tool.
2015-01-24 07:35:44 -05:00
Brad King 154bf8da99 Merge topic 'INTERFACE_SYSTEM_INCLUDE_DIRECTORIES-update'
85857e6d Help: Clarify INTERFACE_SYSTEM_INCLUDE_DIRECTORIES documentation.
ee38062b IncludeDirectories: Respect SYSTEM flag when using CONFIG genex.
2015-01-23 10:50:31 -05:00
Brad King 103f77e512 Merge topic 'test-complex-remove-bad-indentation'
560b3e9f Tests: Remove incorrect indentation from Complex test comment
2015-01-23 10:50:28 -05:00
Brad King 9f559a2608 Merge topic 'GNU-4.4-compile-features'
374a66b5 Features: Blacklist raw string literals test for GNU 4.4
2015-01-23 10:50:22 -05:00
Stephen Kelly ee38062be8 IncludeDirectories: Respect SYSTEM flag when using CONFIG genex.
Update the Makefile and Ninja generators to use the config when
requesting the include flags.
2015-01-23 00:08:18 +01:00
Brad King 560b3e9f1d Tests: Remove incorrect indentation from Complex test comment 2015-01-22 14:11:46 -05:00
Brad King c0298947ff Merge topic 'cdash_upload_file_mode'
f3e0b6f1 CTestCoverageCollectGCOV: Add module to run gcov
6dd980e0 ctest_submit: Make CDASH_UPLOAD mode arguments more strict
5dc33f89 ctest_submit: Add CDASH_UPLOAD mode to upload files to CDash
2015-01-22 11:16:45 -05:00
Brad King 529293e344 Merge topic 'WriteCompilerDetectionHeader-tests'
3c0996c1 WCDH: Test that no C compiler features are defined for CXX compiler.
8dc0c976 WCDH: Fix the C_STANDARD property in the tests.
2015-01-22 09:50:38 -05:00
Brad King be2a74dbcb Merge topic 'GNU-4.4-compile-features'
965a50dc Features: Fix GNU 4.4 and 4.5 C standard level flags
7f4154a4 Features: Fix CompileFeatures non-feature tests for space in path
f40c19b5 Features: Fix CompileFeatures test for C non-features
2015-01-22 09:50:36 -05:00
Brad King 374a66b58c Features: Blacklist raw string literals test for GNU 4.4
RedHat gcc 4.4.7-11 supports raw string literals, so simply blacklist
the test for its rejection.
2015-01-22 09:39:35 -05:00
Brad King afd998373d Merge topic 'test-ctest_submit-fail-with-RunCMake'
ef97cd85 Tests: Fix obscure RunCMake.CTestSubmit 'drop' case failures
76f7eb2e Tests: Extend RunCMake.CTestSubmit test to cover 'drop' failures
2015-01-21 16:36:20 -05:00
Brad King ef97cd8587 Tests: Fix obscure RunCMake.CTestSubmit 'drop' case failures
When curl is given a URL of the form '<something>://' it tries to
resolve '<something>' as a host name.  If the host happens to exist and
have a server then the drop might actually appear to work.  Instead use
an explicit '-no-site-' host to ensure it cannot connect.

Reported-by: Gilles Khouzam <Gilles.Khouzam@microsoft.com>
2015-01-21 16:34:42 -05:00
Brad King 7f4154a4aa Features: Fix CompileFeatures non-feature tests for space in path
Fix the <lang>_non_features try_compile calls to work correctly when
there is a space in the path.  Otherwise they all fail due to the space
instead of the lack of a feature.
2015-01-21 15:42:08 -05:00
Brad King f40c19b543 Features: Fix CompileFeatures test for C non-features
Add a "feature_test.c" file corresponding to "feature_test.cpp" but for
the C language.  This source will be needed by C_non_features entries.
2015-01-21 15:40:47 -05:00
Brad King 6dd980e0ef ctest_submit: Make CDASH_UPLOAD mode arguments more strict
Disallow mixing of arguments from different command signatures.
Extend the RunCMake.CTestSubmit test to cover such error cases.
2015-01-20 09:33:21 -05:00
Brad King 1ef4e3ab45 Merge topic 'cmake-E-tar-mtime'
3a60c899 cmake: Teach "-E tar" command a "--mtime=" option
90f9c427 cmake: Teach "-E tar" to report file name on failure to read from disk
2015-01-20 09:20:12 -05:00
Brad King 3a60c899fc cmake: Teach "-E tar" command a "--mtime=" option
Add an option to set the mtime of entries in a tarball so that one can
create a tarball with a consistent content hash (e.g. MD5) for a given
set of files regardless of their current timestamps on disk.  This will
be useful for submission of tarballs to CDash, which tracks content
hashes to avoid duplication.

Inspired-by: Bill Hoffman <bill.hoffman@kitware.com>
2015-01-19 14:16:19 -05:00
Stephen Kelly 3c0996c135 WCDH: Test that no C compiler features are defined for CXX compiler.
This amends commit 54156d72 (WCDH: Generate per-language files
in multi-file mode., 2015-01-17).
2015-01-19 20:03:23 +01:00
Stephen Kelly 8dc0c97666 WCDH: Fix the C_STANDARD property in the tests.
The CXX_STANDARD property validates the values allowed for it,
and '90' is not a valid value for it.  However, the validation is only
done for languages enabled for the target, and as C_undefined has no
CXX files, that language is not enabled for it.

This amends commit v3.1.0-rc3~23^2 (WCDH: Make the header -Wundef
safe for the C language., 2014-11-24).
2015-01-19 19:57:54 +01:00
Brad King 813ace90e4 Merge topic 'GNU-4.4-compile-features'
004e1540 Features: Record for GNU 4.4.
2a5ca650 Features: Wrap failure-test in UNIX condition.
1ae2c6b2 Features: Blacklist cxx_constexpr test for GNU 4.5.
c66e3317 Features: Use a more-common feature in cycle-test.
c43a6dc5 Features: Update comment in test to match the code.
78259135 Features: Test presence of cxx_auto_type with genex.
7b9fc88b Features: Remove outdated comment.
2015-01-19 13:55:31 -05:00
Brad King 137a15bf1d Merge topic 'SolarisStudio-compile-features'
00194ea7 Help: Add notes for topic 'SolarisStudio-compile-features'
bcb04783 Features: Record for SolarisStudio 12.4.
536c535c Features: Adjust cxx_variadic_templates unit test for SolarisStudio.
5d57970d Features: Use variable in cxx_inheriting_constructors test.
69182ce4 Features: Ensure that the cxx_auto_type test is correct.
2015-01-19 13:55:29 -05:00
Brad King 2e71d92ef2 Merge topic 'test-ctest_submit-fail-with-RunCMake'
352de1d7 Tests: Add RunCMake.CTestSubmit cases covering ctest_submit failures
2015-01-19 10:03:12 -05:00
Brad King 76f7eb2e4a Tests: Extend RunCMake.CTestSubmit test to cover 'drop' failures
Replace the TODO comment with calls to run_ctest_submit_FailDrop.  For
now leave curl errors out of expected stderr.  They can be ported over
from CTestTestFailedSubmit-* tests later.
2015-01-19 09:56:38 -05:00
Brad King 352de1d749 Tests: Add RunCMake.CTestSubmit cases covering ctest_submit failures
Cover command invocation argument errors.  Prepare infrastructure
to cover failed 'drop' cases, but do not cover them yet because
we need to collect error messages from each platform.
2015-01-19 09:53:57 -05:00
Brad King 5803ae3e88 Merge topic 'add-FindJsonCpp'
0aebeb9c FindJsonCpp: Add module to find JsonCpp package
2015-01-19 09:43:12 -05:00
Brad King 0aebeb9c84 FindJsonCpp: Add module to find JsonCpp package 2015-01-19 09:34:03 -05:00
Stephen Kelly 2a5ca650c9 Features: Wrap failure-test in UNIX condition.
The use of GNU on non-UNIX for 'compile features' is not
tested and is not well defined.
2015-01-18 15:01:14 +01:00
Stephen Kelly 1ae2c6b2c9 Features: Blacklist cxx_constexpr test for GNU 4.5. 2015-01-18 14:46:55 +01:00
Stephen Kelly c66e331749 Features: Use a more-common feature in cycle-test.
We require that the $<$<COMPILE_FEATURES:cxx_feature>:empty2> generates
a '1' when CXX11 is enabled.  GNU 4.4 does not support cxx_nullptr, but
does support cxx_auto_type.
2015-01-18 14:46:45 +01:00
Stephen Kelly c43a6dc5ec Features: Update comment in test to match the code.
After commit f13a2eb1 (Features: Adjust the RunCMake test to use
more-common features., 2015-01-15).
2015-01-18 14:46:45 +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 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 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 5d57970dd9 Features: Use variable in cxx_inheriting_constructors test.
Avoid warning with SolarisStudio.
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
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 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
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 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
Stephen Kelly 06ff525492 Features: Extend the tests for the COMPILE_FEATURES genex. 2015-01-15 21:51:18 +01:00
Brad King 6c121924ad Tests: Teach RunCMake to report command-line on failure
When a test sets RunCMake_TEST_COMMAND, report the command line
on failure to make it easier to run by hand for debugging.
2015-01-15 14:46:58 -05:00
Brad King 0fe4d8bb3b ExternalData: Add support for custom download scripts
Add support for a special URL template to map the fetch operation
to a project-specified .cmake script insead of using file(DOWNLOAD).

Extend the Module.ExternalData test to cover the behavior.
Extend the RunCMake.ExternalData test to cover error cases.
2015-01-15 10:48:09 -05:00
Brad King b4263abdea Merge topic 'Xcode-clang-compile-features'
dcd72a74 Help: Add notes for topic 'Xcode-clang-compile-features'
3ad893b5 Features: Record for historical Xcode clang versions.
98965fb1 Features: Record dialect flags for AppleClang 4.0+.
2015-01-15 09:54:08 -05:00
Brad King 44612e7407 Merge topic 'fix-LOCATION-with-TARGET_OBJECTS'
23f3798c cmTarget: Compute link language of TARGET_OBJECTS with CMP0026 OLD (#15338)
2015-01-15 09:53:59 -05:00
Brad King 101a62aacb Merge topic 'revert-feature_record_msvc'
4ce110bb Tests: Revert workaround for COMPILE_FEATURES genex bug
0b7e7e27 Revert topic 'feature_record_msvc'
2015-01-15 09:53:47 -05:00