Commit Graph

3002 Commits

Author SHA1 Message Date
Stephen Kelly a579a0aab4 Features: Add cxx_inheriting_constructors. 2014-04-08 11:05:55 +02:00
Stephen Kelly ebab2015f9 Features: Add cxx_explicit_conversions. 2014-04-08 11:05:55 +02:00
Stephen Kelly ac3a1b14c0 Features: Add cxx_deleted_functions. 2014-04-08 11:05:55 +02:00
Stephen Kelly 91f3699000 Features: Add cxx_defaulted_functions. 2014-04-08 11:05:54 +02:00
Stephen Kelly 7e748417bc Features: Add cxx_decltype. 2014-04-08 11:05:54 +02:00
Stephen Kelly 8d3467636c Features: Add cxx_strong_enums. 2014-04-08 11:05:54 +02:00
Stephen Kelly 0caf08e43e Features: Add cxx_auto_function. 2014-04-08 11:05:54 +02:00
Stephen Kelly 0685ac6edc Features: Add cxx_override. 2014-04-08 11:05:54 +02:00
Stephen Kelly 57ac6a905c Features: Add cxx_final. 2014-04-08 11:05:54 +02:00
Stephen Kelly 88542a6101 Features: Add cxx_static_assert. 2014-04-08 11:05:54 +02:00
Stephen Kelly 91289312fa Features: Add cxx_constexpr. 2014-04-08 11:05:54 +02:00
Stephen Kelly 10f33eee1d Features: Add cxx_variadic_templates.
Expect cxx_variadic_templates to implement N2555.

N2555 is essentially a bugfix and predates most compiler releases which
aimed to experimentally support variadic templates.
2014-04-08 11:05:54 +02:00
Stephen Kelly 750dfee29c Features: Add cxx_delegating_constructors. 2014-04-08 11:05:54 +02:00
Stephen Kelly 9eaf375598 Export: Populate INTERFACE_COMPILE_FEATURES property. 2014-04-08 11:05:07 +02:00
Stephen Kelly 8ed59fc207 Add target_compile_features command.
This can be used to set the compiler features required by particular
targets. An error is issued at CMake time if the compiler does not
support the required feature. If a language dialect flag is required
by the features used, that will be added automatically.

Base the target_compile_features command on cmTargetPropCommandBase. This
gives us 'free' handling of IMPORTED, ALIAS, INTERFACE, non-compilable
and missing targets.
2014-04-07 18:11:18 +02:00
Stephen Kelly 5412deded1 cmTarget: Transitively evaluate compiler features.
Extend the interface of the target_compile_features command with
PUBLIC and INTERFACE keywords. Populate the INTERFACE_COMPILER_FEATURES
target property if they are set. Consume the INTERFACE_COMPILER_FEATURES
target property from linked dependent targets to determine the final
required compiler features and the compile flag, if needed.

Use the same pattern of origin-debugging which is used for other
build properties.
2014-04-07 18:11:18 +02:00
Stephen Kelly baff44345c cmTarget: Allow populating COMPILE_FEATURES using generator expressions.
Delay validation of the content as a feature if it contains a
generator expression. It will be checked again at generate-time
after evaluation.
2014-04-07 18:11:18 +02:00
Stephen Kelly f97bf4370c Features: Add cxx_auto_type.
Record the availability of this feature for GNU 4.8 on (UNIX AND
NOT APPLE) only.  In the future, availability can be recorded for
earlier GNU, for other platforms and for other compilers. Initially
the affected configurations are as restricted as possible to allow
for easy testing while extending the features vector in only one
dimension.

The error message when using the set_property API directly is not
very good, but follow up commits will provide origin debugging of
the property and a target_compile_features command which will
provide a configure-time backtrace when possible.
2014-04-07 18:11:18 +02:00
Stephen Kelly 913394af24 cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties.
These are used to determine whether to add -std=c++11, -std=gnu++11
etc flags on the compile line.
2014-04-07 16:48:44 +02:00
Stephen Kelly 8238a6cd5d Add some COMPILE_OPTIONS for specifying C++ dialect.
These are compiler-specific, compiler version specific, extension specific
and standard version specific.
2014-04-07 16:48:44 +02:00
Stephen Kelly 892243fc3b Tests: Require CMake 3.0 for the SystemInformation test.
Correctly identify AppleClang.
2014-04-07 16:48:44 +02:00
Stephen Kelly c869984ea0 RunCMake: Allow specifying the source dir and file to test.
This will allow decoupling the name of the test from the name and
location of the source file under test, which means one source
file can be used for multiple tests.

Rename the PARENT_SCOPE test in RunCMake.set to not use a keyword
of the if() command as a file name.  As the filename is now used
with an if condition, this causes a conflict.
2014-04-06 23:58:35 +02:00
Alex Ciobanu 63d864a026 Tests: Fix CTestTestFailedSubmit-ftp with OS X system libcurl
On OS X 10.9 the system libcurl has a different error message when
failing to connect:

  Failed connect to :21; Connection refused

Match this message to pass the test.
2014-04-03 16:48:37 -04:00
Brad King 5376151aa1 Merge topic 'target-transitive-sources'
9407174b target_sources: New command to add sources to target.
81ad69e0 Make the SOURCES target property writable.
6e636f2e cmTarget: Make the SOURCES origin tracable.
3676fb49 cmTarget: Allow transitive evaluation of SOURCES property.
e6971df6 cmTarget: Make the source files depend on the config.
df753df9 cmGeneratorTarget: Don't add computed sources to the target.
869328aa cmComputeTargetDepends: Use valid config to compute target depends.
2014-04-03 12:51:53 -04:00
Brad King 93054aa84f Merge topic 'target-sources-refactor'
5de63265 Genex: Only evaluate TARGET_OBJECTS to determine target sources.
aa0a3562 cmGeneratorTarget: Compute target objects on demand
042c1c83 cmTarget: Compute languages from object libraries on demand.
fdcefe3c cmGeneratorTarget: Compute consumed object libraries on demand.
c355d108 cmComputeTargetDepends: Track object library depends.
e5da9e51 cmTarget: Allow any generator expression in SOURCES property.
5702e106 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property.
857d30b5 cmGlobalGenerator: Add interface to call ForceLinkerLanguages
28e1d2f8 cmStringCommand: Add GENEX_STRIP subcommand.
bf98cc25 Genex: Evaluate TARGET_OBJECTS as a normal expression.
8cd113ad cmTarget: Store strings instead of cmSourceFile* to represent SOURCES.
4959f341 cmSourceFileLocation: Collapse full path for directory comparisons.
fcc92878 cmSourceFileLocation: Remove unused Update method.
59e8740a cmTarget: Remove AddSourceFile method
26d494ba cmTarget: Use string API to add sources to cmTarget objects.
d38423ec cmTarget: Add a method to obtain list of filenames for sources.
...
2014-04-03 12:51:51 -04:00
Stephen Kelly 9407174b1a target_sources: New command to add sources to target. 2014-04-02 23:14:02 +02:00
Stephen Kelly 81ad69e056 Make the SOURCES target property writable. 2014-04-02 23:14:02 +02:00
Stephen Kelly 6e636f2eba cmTarget: Make the SOURCES origin tracable. 2014-04-02 23:14:02 +02:00
Stephen Kelly 3676fb4963 cmTarget: Allow transitive evaluation of SOURCES property.
Extend the cmGeneratorExpressionDAGChecker with an interface
returning the name of the top target.  Use that to determine
when there is a DAG violation, as required by the RunCMake.Languages
tests.
2014-04-02 23:14:02 +02:00
Stephen Kelly e6971df6ab cmTarget: Make the source files depend on the config.
Disallow the use of config-specific source files with
the Visual Studio and Xcode generators. They don't have
any way to represent the condition currently.

Use the same common-config API in cmQtAutoGenerators. While
it accepts config-specific files, it doesn't have to support
multiple configurations yet.

Loop over the configs in cmTargetTraceDependencies
and cmGlobalGenerator::WriteSummary and consume all source
files.

Loop over the configs in cmComputeTargetDepends and compute the
object library dependencies for each config.
2014-04-02 23:14:02 +02:00
Stephen Kelly 5de63265e3 Genex: Only evaluate TARGET_OBJECTS to determine target sources.
The output of this expression may contain macros for IDEs to replace
such as $(Configuration), $(CURRENT_ARCH) etc.  To avoid generating
content which is not usable in other contexts, report an error if
there is an attempt to use it in other contexts.

This commit may be reverted in the future if a solution to the
above difference is implemented.
2014-04-02 23:12:57 +02:00
Stephen Kelly fdcefe3c42 cmGeneratorTarget: Compute consumed object libraries on demand.
Remove up-front object library computation from cmGlobalGenerator.

Adjust tests for message coming from the generator expression
evaluation.
2014-04-02 23:12:56 +02:00
Stephen Kelly e5da9e51d0 cmTarget: Allow any generator expression in SOURCES property.
Remove use of UseObjectLibraries from Makefile and Ninja generators. It
is not needed now because those generators use GetExternalObjects
which already contains the objects from object libraries.

The VS10 generator calls both the UseObjectLibraries and the GetExternalObjects
methods. Ensure that duplicates are not created by skipping objects
from object libraries in handling of GetExternalObjects.

Similarly, fix VS6, VS7 and Xcode object handling by skipping
external objects from OBJECT_LIBRARY usage as appropriate.

The error message in the BadSourceExpression1 test is now reported
by the generator expression evaluator, so it has different text.
2014-04-02 23:12:56 +02:00
Stephen Kelly 5702e10677 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property.
Add policy CMP0051 to control this behavior.
2014-04-02 23:12:56 +02:00
Brad King f70b2253f6 Merge topic 'fix_policy_diagnostics'
77b581c2 Policies: omit warnings about unset policies when they are actually set to NEW
2014-04-01 11:06:17 -04:00
Stephen Kelly 28e1d2f8fc cmStringCommand: Add GENEX_STRIP subcommand.
Strip out any generator expressions in the input string.
2014-03-31 23:18:44 +02:00
Stephen Kelly bf98cc252f Genex: Evaluate TARGET_OBJECTS as a normal expression. 2014-03-31 23:18:44 +02:00
Stephen Kelly 4959f3413c cmSourceFileLocation: Collapse full path for directory comparisons.
Otherwise Matches() ends up doing a comparison of
the directories

 /path/to/dir/subdir/..

and

 /path/to/dir

as strings and not matching where it should.
2014-03-31 23:18:43 +02:00
Nils Gladitz 77b581c2f0 Policies: omit warnings about unset policies when they are actually set to NEW 2014-03-31 09:45:10 -04:00
Brad King c53e82093f Merge topic 'fix-CTestTestMemcheck-xcode2-missing-dirs'
27b81213 Tests/CTestTestMemcheck: Help Xcode 2.x create output dirs
2014-03-27 11:12:05 -04:00
Brad King 27b812132c Tests/CTestTestMemcheck: Help Xcode 2.x create output dirs
Add the PRE_BUILD step to all targets that need it so the output
directories get created no matter which target is built first.
2014-03-26 15:09:56 -04:00
Brad King edb506b862 Merge topic 'fix-Qt-Autogen'
71a11252 QtAutogen: Fix use of multiple ui files in a single target.
261acd91 QtAutogen: Use the basename for resource files.
2014-03-26 13:24:43 -04:00
Stephen Kelly 71a11252e9 QtAutogen: Fix use of multiple ui files in a single target.
Don't store a mapping of the directory to the ui file. The directory
will be a unique key, allowing only one ui file to be specified.
Use the source file name instead as the mapping key.
2014-03-25 01:39:03 +01:00
Stephen Kelly 261acd9109 QtAutogen: Use the basename for resource files.
The rcc tool generates a cpp file with a symbol called qInitResources
or called qInitResources_${name}, if the name is passed. The
qInitResources symbol clashes if multiple qrc files are used in
one target.

Always pass the name to ensure that the symbol is unique. This is also
the behavior of the qtx_add_resource macros.
2014-03-25 01:16:49 +01:00
Stephen Kelly 734df96f5a Qt4: Fix moc command dependencies for incremental build.
Since commit v2.8.12~327^2 (Qt4Macros: Allow specifying a TARGET
in invokations of macros., 2013-02-26), a parameters file is
populated with moc arguments at generate-time.

When the compile definitions or include directories change, the
parameters file is updated but moc is not re-run in response.

Fix that by making the moc invocation depend on the parameters file.

Reported-At: https://bugreports.qt-project.org/browse/QTBUG-36970
2014-03-21 11:14:41 +01:00
Brad King 565213c1fd Merge topic 'configure_file-unicode'
98383f80 Unicode: check encoding of files given to configure_file.
2014-03-20 09:22:28 -04:00
Brad King df136e6c27 Merge topic 'ExternalProject-no-download-progress'
f1b953ec Help: Add notes for topic 'ExternalProject-no-download-progress'
7d35b550 ExternalProject: Add option to disable download progress (#14807)
2014-03-20 09:22:26 -04:00
Brad King b048a3edd0 Merge topic 'FindPkgConfig_Extend-PKG_CONFIG_PATH_2'
cc5a0d8f FindPkgConfig: More unit tests
453d2b24 FindPkgConfig: small refactoring
2014-03-20 09:22:25 -04:00
Brad King 82c590b12e Merge topic 'CheckTypeSize_#14056'
7f857775 CheckTypeSize: Add unit test to cover the no-C case
7d6d45f2 CheckTypeSize: Support for CXX when C language is not enabled
2014-03-20 09:22:23 -04:00
Brad King aa8f8777a4 Merge topic 'fix-AllFindModules-test-module-path'
cf3e87e1 Tests: Teach CMakeOnly.AllFindModules to tolerate a system KDE4
2014-03-20 09:22:18 -04:00
Brad King e1c1f18e39 Merge topic 'add_custom_command-DEPENDS-genex'
bbffccca add_custom_command: Evaluate generator expressions in DEPENDS
2014-03-20 09:22:17 -04:00
Brad King fb60cf46b6 Merge topic 'fix-out-of-date-CTestTestMemcheck'
84a42304 Tests: Prevent unnecessary rebuilds in CTestTestMemcheck
2014-03-20 09:22:14 -04:00
Brad King 86b003c3c6 Merge topic 'add_custom_command-no-INTERFACE-lib'
2600e923 Disallow INTERFACE libraries with add_custom_command(TARGET).
2014-03-20 09:22:12 -04:00
Stephen Kelly bbffccca42 add_custom_command: Evaluate generator expressions in DEPENDS
Rely on evaluation in cmCustomCommandGenerator for the generators.

When tracing target dependencies, depend on the union of dependencies
for all configurations.
2014-03-20 09:21:56 -04:00
David Cole 84a4230406 Tests: Prevent unnecessary rebuilds in CTestTestMemcheck
Repeated "cmake . && ninja" calls were resulting in rebuilds every time.

Change the test so that it uses "file(WRITE" to generate a ".in" file and
then configure_file to "copy if different" that ".in" file to the final
generated source file.

Now, rebuilds will only occur if there are changes to the generated source
file on "cmake ." runs after the first one.
2014-03-20 09:02:50 -04:00
Brad King cf3e87e195 Tests: Teach CMakeOnly.AllFindModules to tolerate a system KDE4
The FindKDE4 module (incorrectly) modifies CMAKE_MODULE_PATH on the
caller's behalf.  This causes KDE4-installed find modules to be used by
the test instead of those in CMake.  Teach the test to restore the
CMAKE_MODULE_PATH to its original value after each find_package call.
This ensures that the next find_package actually tests our module.
2014-03-19 13:33:00 -04:00
Stephen Kelly 2600e923a6 Disallow INTERFACE libraries with add_custom_command(TARGET).
Don't attempt to trace their dependencies.
2014-03-19 15:51:21 +01:00
Clinton Stimpson 98383f802a Unicode: check encoding of files given to configure_file.
UTF-16 and UTF-32 files are rejected.
2014-03-17 14:01:55 -06:00
Daniele E. Domenichelli cc5a0d8f42 FindPkgConfig: More unit tests 2014-03-17 18:10:59 +01:00
Daniele E. Domenichelli 7f857775e2 CheckTypeSize: Add unit test to cover the no-C case 2014-03-17 17:36:14 +01:00
Brad King 7d35b55060 ExternalProject: Add option to disable download progress (#14807)
Add a DOWNLOAD_NO_PROGRESS option to disable progress reports while
downloading source tarballs.
2014-03-17 11:28:05 -04:00
Brad King 41b82db685 Merge topic 'FindPkgConfig_Extend-PKG_CONFIG_PATH'
3df51470 FindPkgConfig: Extend PKG_CONFIG_PATH using CMake variables (#12926)
2014-03-17 09:49:58 -04:00
Daniele E. Domenichelli 3df5147043 FindPkgConfig: Extend PKG_CONFIG_PATH using CMake variables (#12926)
Use CMAKE_PREFIX_PATH, CMAKE_FRAMEWORK_PATH, and CMAKE_APPBUNDLE_PATH
cache and environment variables to extend PKG_CONFIG_PATH before calling
pkg-config.

In each of the path in these variables it searches for lib/pkgconfig.
Then, depending on the system, it searches for
lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig (debian) or for
lib64/pkgconfig (other 64 bit unixes). If any of these path is found,
it is appended to the PKG_CONFIG_PATH enviromnent variable.

Add two new arguments to the pkg_check_module and pkg_search_module
macro, NO_CMAKE_PATH and NO_CMAKE_ENVIRONMENT_PATH. The new signature
are therefore:

   pkg_check_modules(<PREFIX> [REQUIRED] [QUIET]
                     [NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH]
                     <MODULE> [<MODULE>]*)
   pkg_search_module(<PREFIX> [REQUIRED] [QUIET]
                     [NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH]
                     <MODULE> [<MODULE>]*)

By default, if CMAKE_MINIMUM_REQUIRED_VERSION is 3.1 or later (in
order to keep compatibility with the previous behavior), or if
PKG_CONFIG_USE_CMAKE_PREFIX_PATH is set, the CMAKE_PREFIX_PATH,
CMAKE_FRAMEWORK_PATH, and CMAKE_APPBUNDLE_PATH cache and environment
variables will be added to pkgconfig search path.

The NO_CMAKE_PATH and NO_CMAKE_ENVIRONMENT_PATH arguments disable this
behavior for the cache variables and the environment variables,
respectively, similarly to the find_package() command.
2014-03-17 09:43:08 -04:00
Brad King 6e466c6f2e Merge branch 'master' into CONFIG-LOCATION-CMP0026 2014-03-17 09:31:21 -04:00
Stephen Kelly c903b5319b cmTarget: Restore <CONFIG>_LOCATION to CMP0026 OLD behavior (#14808)
Restore support for the undocumented <CONFIG>_LOCATION target property
removed by commit v3.0.0-rc1~175^2 (cmTarget: Remove support for
<CONFIG>_LOCATION property, 2013-12-30) as part of the CMP0026 OLD
behavior.
2014-03-17 09:30:39 -04:00
Brad King a25b809f20 Tests: Check find_dependency empty extra arguments
Add cases for empty arg 2 and arg 3.
2014-03-13 15:57:03 -04:00
Brad King d363cbf315 Tests: Make RunCMake.find_dependency tolerate line number changes 2014-03-13 15:47:08 -04:00
Brad King e1a671c7d8 Merge topic 'fix-CMP0046-warning'
d83245a3 cmTarget: Don't create duplicate backtraces in CMP0046 warning
2014-03-13 09:36:06 -04:00
Stephen Kelly d83245a34f cmTarget: Don't create duplicate backtraces in CMP0046 warning 2014-03-12 18:01:26 +01:00
Stephen Kelly f74a8405b6 Test error cases in find_dependency. 2014-03-11 14:48:35 +01:00
Brad King 510ceb19ed Merge topic 'fix-AUTOGEN-custom-command-depends'
112cba92 QtAutogen: Fix AUTOGEN depends on custom command output with VS.
2014-03-11 09:13:58 -04:00
Brad King c9241cad83 Merge topic 'fix-find_dependency-EXACT-for-master'
45abfb0c find_dependency: Extend the tests for use of EXACT macro parameter.
2014-03-11 09:13:56 -04:00
Brad King ebaa5a6410 Merge branch 'fix-AUTOGEN-custom-command-depends' into release 2014-03-10 09:38:52 -04:00
Brad King 98e3831a67 Merge branch 'fix-policy-scopes' into release 2014-03-10 09:36:28 -04:00
Brad King 7b0efcded3 Merge topic 'fix-policy-scopes'
50fd0a33 Tests: Simplify and document policy scopes in RunCMake.CMP* tests
b1bbee3e Record more policies on targets when created
2014-03-10 09:33:25 -04:00
Stephen Kelly 112cba927a QtAutogen: Fix AUTOGEN depends on custom command output with VS.
Visual Studio is handled as a special case for autogen depends. However,
the special handling works only for target dependencies, not file
dependencies output by a custom command.

Use a PRE_BUILD step only if all depends are targets.
2014-03-10 13:01:29 +01:00
Stephen Kelly 45abfb0c4d find_dependency: Extend the tests for use of EXACT macro parameter. 2014-03-10 09:07:38 +01:00
Brad King ad9f0d831e Merge topic 'dev/string-apis'
b633b263 CPackWiX: Fix test to build with expected config
191f25e2 stringapi: Prevent a NULL dereference in WiX
219d6ad6 speedup: Avoid excess iterator dereferences
caaad357 speedup: Cache strings for comparisons
7abf4e31 stringapi: Use strings for dependency information
94fc63e2 stringapi: Use strings for cache iterator values
85fc9f26 stringapi: Command names
6557382d stringapi: Use strings for program paths
1a1b737c stringapi: Use strings for generator names
24b5e93d stringapi: Use strings for directories
11ed3e2c stringapi: Add string overload for the Def struct
b3bf31a5 stringapi: Miscellaneous char* parameters
5af95c39 typo: Match argument name with the header
2b17626e stringapi: Pass strings as install directories in CPack
3def29da stringapi: Use strings for feature arguments
acb116e3 stringapi: Return a string reference for the configuration
...
2014-03-09 10:29:02 -04:00
Brad King b633b26308 CPackWiX: Fix test to build with expected config 2014-03-08 13:05:40 -05:00
Ben Boeckel 270eb96df0 strings: Remove cmStdString references
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.

The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
2014-03-08 13:05:35 -05:00
Brad King 50fd0a33c9 Tests: Simplify and document policy scopes in RunCMake.CMP* tests
Drop unnecessary NO_POLICY_SCOPE options.  Document why the remaining
options are necessary.
2014-03-06 11:07:03 -05:00
Brad King b1bbee3e9a Record more policies on targets when created
Policies CMP0027, CMP0038, and CMP0046 have per-target meaning so
record the policy settings on targets as they are created.
2014-03-06 11:05:47 -05:00
Brad King 25fb430e96 Utilities/Release: Fix nightly build upload
Since commit 71b14dcb (Utilities/Release: Do not upload doc staging
tarball, 2014-02-26) the prefix upload_release.cmake computes does not
match any files when used with -DVERSION=master as has been done for the
nightly binary builds.  Since the version is not actually 'master'
anyway, change the nightly binary upload logic to explicitly pass the
destination directory.  Do not pass any VERSION so the default is taken
and matches the binaries.
2014-03-06 09:32:04 -05:00
Brad King cefa80236d Merge topic 'test-external-cmake'
9608ef6f Tests: Optionally configure tests exclusively, with an external CMake
9f5bd180 Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables
76477267 Tests: Drop CMAKE_TEST_MAKEPROGRAM variable
a8a9fb7e Tests: Rename CMAKE_TEST_MAKEPROGRAM uses for explicit make program
40475573 Tests: Rename CMAKE_TEST_MAKEPROGRAM uses for nested test projects
f99734b2 Tests: Rename CMAKE_TEST_DEVENV -> CMake_TEST_DEVENV
3c01ee5a Tests: Drop CMAKE_TEST_MSVC and test MSVC directly
daf0a5fe Tests: Drop CMAKE_TEST_GENERATOR and CMAKE_TEST_MAKEPROGRAM options
e5096312 Tests: Drop kwsys test
2014-03-05 11:07:59 -05:00
Brad King 9e6e9140c2 Merge topic 'fix-CMP0017-check'
7e187eea CMP0017: Fix check when including from CMake source tree
2014-03-05 11:07:58 -05:00
Brad King 7e187eeacd CMP0017: Fix check when including from CMake source tree
When running CMake from the build tree the CMAKE_ROOT is the
entire source tree.  Fix the CMP0017 check to be specific to
the Modules/ directory under CMAKE_ROOT so that Tests/ does
not count.  Fix the FindPackageTest modules to include FPHSA
by full path from CMAKE_ROOT so that they do not include the
local FPHSA which reports an error meant to test that CMP0017
works.
2014-03-04 09:35:00 -05:00
Brad King 9608ef6f40 Tests: Optionally configure tests exclusively, with an external CMake
Add an undocumented CMake_TEST_EXTERNAL_CMAKE option to name an external
CMake 'bin' directory.  Skip all main CMake binary builds and instead
configure the Tests directory to run using the external CMake provided.
This will provide a means to exercise the CMake test suite generating
for target platforms and compilers with which the CMake source does not
build.  That will allow us to raise the level of C++ features required
of a compiler to build our source while retaining tests for generating
projects with older compiler tools.
2014-03-03 15:49:17 -05:00
Brad King 9f5bd180c8 Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables
s/CMAKE_TEST_GENERATOR/CMAKE_GENERATOR/g
2014-03-03 15:26:49 -05:00
Brad King 76477267bd Tests: Drop CMAKE_TEST_MAKEPROGRAM variable
Remaining uses of the variable simply test its value so use
CMAKE_MAKE_PROGRAM directly instead.
2014-03-03 15:26:49 -05:00
Brad King a8a9fb7edd Tests: Rename CMAKE_TEST_MAKEPROGRAM uses for explicit make program
Rename uses of the variable for specifying the make program used to
build test projects to CMake_TEST_EXPLICIT_MAKE_PROGRAM.
2014-03-03 15:26:48 -05:00
Brad King 4047557379 Tests: Rename CMAKE_TEST_MAKEPROGRAM uses for nested test projects
In the ExportImport, Fortran, and MacRuntimePath tests the
CMAKE_TEST_MAKEPROGRAM variable is used to pass an explicit request for
a CMAKE_MAKE_PROGRAM value to be used when building the inner projects.
Rename these use cases to CMake_TEST_NESTED_MAKE_PROGRAM.
2014-03-03 15:26:48 -05:00
Brad King f99734b2da Tests: Rename CMAKE_TEST_DEVENV -> CMake_TEST_DEVENV
Follow the convention of naming variables related to the CMake build
itself as "CMake_" rather than "CMAKE_".  While at it, consolidate the
code computing CMake_TEST_DEVENV to be more localized.
2014-03-03 15:26:48 -05:00
Brad King 3c01ee5adc Tests: Drop CMAKE_TEST_MSVC and test MSVC directly
Now that we no longer support running tests using a different generator
we can trust the MSVC platform indicator directly.
2014-03-03 15:26:48 -05:00
Brad King daf0a5fede Tests: Drop CMAKE_TEST_GENERATOR and CMAKE_TEST_MAKEPROGRAM options
Drop the option to test with a different generator and make program than
was used to build.  This was used only to test support for the Open
Watcom compiler which at one time could not build CMake.  Instead we
will allow CMake to be configured to skip building binaries and just run
the test suite using an external CMake (in a future change).

For now leave the two option variables hard-coded to the old option
defaults until code can be updated to stop using them.
2014-03-03 15:26:46 -05:00
Brad King e509631237 Tests: Drop kwsys test
KWSys now has its own dashboard and test clients that run on all the
machines where we test CMake.  We no longer need a test inside CMake to
test KWSys independently.
2014-03-03 15:25:01 -05:00
Daniele E. Domenichelli 8372b4553b FeatureSummary: Add unit tests 2014-03-03 19:52:13 +01:00
Nils Gladitz 642fa25da0 CPackWIX: support installation of empty directories 2014-03-02 00:51:42 +01:00
Nils Gladitz 378eb5b712 CPackWIX: Allow Windows Installer property customization 2014-03-01 23:13:35 +01:00
Brad King a4656986e1 Merge topic 'tests-RunCMake-no-unused'
7cd239ed Tests/RunCMake: Tell cmake not to report unused command-line options
2014-02-28 09:48:40 -05:00
Brad King 7cd239ed38 Tests/RunCMake: Tell cmake not to report unused command-line options
On OS X we pass -DCMAKE_POLICY_DEFAULT_CMP0025=NEW to all tests.
Once tests start using cmake_minimum_required(VERSION 3.0) then
CMake will warn that CMAKE_POLICY_DEFAULT_CMP0025 is unused.
These warnings are not part of the expected test output and can
cause such tests to fail.  Pass --no-warn-unused-cli to each test
cmake invocation to tell it not to produce these warnings.
2014-02-27 13:25:23 -05:00