summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* file(GENERATE): Only write the file if content is different.Stephen Kelly2014-04-304-0/+34
| | | | No policy is used to control this behavior for now.
* Merge topic 'feature-absence-hard-error'Brad King2014-04-219-3/+38
|\ | | | | | | | | | | | | 8d0b1cca Features: FATAL_ERROR on compilers with no recorded features. 447fbb3f Tests: Execute compile features tests unconditionally. 597bb72e Tests: Run RunCMake.target_compile_features unconditionally.
| * Features: FATAL_ERROR on compilers with no recorded features.Stephen Kelly2014-04-178-0/+37
| | | | | | | | | | | | Users of the new target_compile_features command are expected to check the existence of the CMAKE_CXX_COMPILE_FEATURES variable before attempting to use it to require features.
| * Tests: Run RunCMake.target_compile_features unconditionally.Stephen Kelly2014-04-161-3/+1
| | | | | | | | | | It is so far testing only cases which are fatal regardless of recorded features.
* | Merge topic 'ExternalData-missing-not-fatal'Brad King2014-04-2111-10/+43
|\ \ | | | | | | | | | | | | ccd29b9a ExternalData: Warn on missing file instead of failing
| * | ExternalData: Warn on missing file instead of failingBrad King2014-04-1711-10/+43
| |/ | | | | | | | | | | | | | | | | | | | | | | When the primary source tree path named by a DATA{} reference does not exist, produce an AUTHOR_WARNING instead of a FATAL_ERROR. This is useful when writing a new DATA{} reference to a test reference output that has not been created yet. This way the developer can run the test, manually verify the output, and then copy it into place to provide the reference and eliminate the warning. If the named source tree path is expected to be a file but exists as a directory, we still need to produce a FATAL_ERROR.
* | CMP0052: Make the warning message more informative.Stephen Kelly2014-04-172-0/+10
| | | | | | | | | | Print the reason for the offending entry in the INTERFACE_INCLUDE_DIRECTORIES.
* | CMP0052: Test that include dirs in install locations cause no warnings.Stephen Kelly2014-04-174-0/+14
|/
* Merge topic 'target_compile_features'Brad King2014-04-1555-0/+232
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9eaf3755 Export: Populate INTERFACE_COMPILE_FEATURES property. 8ed59fc2 Add target_compile_features command. 4e6ca504 cmTargetPropCommandBase: Change the interface to return bool. 5412dede cmTarget: Transitively evaluate compiler features. baff4434 cmTarget: Allow populating COMPILE_FEATURES using generator expressions. f97bf437 Features: Add cxx_auto_type. 03355d6b cmTarget: Add COMPILE_FEATURES target property. faeddf64 project: Add infrastructure for recording CXX compiler features 913394af cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties. 8238a6cd Add some COMPILE_OPTIONS for specifying C++ dialect. 892243fc Tests: Require CMake 3.0 for the SystemInformation test. 59b5fdd3 Don't load Clang-CXX from AppleClang-CXX.
| * Add target_compile_features command.Stephen Kelly2014-04-0735-0/+142
| | | | | | | | | | | | | | | | | | | | | | 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.
| * cmTarget: Transitively evaluate compiler features.Stephen Kelly2014-04-0713-0/+63
| | | | | | | | | | | | | | | | | | | | | | 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.
| * cmTarget: Allow populating COMPILE_FEATURES using generator expressions.Stephen Kelly2014-04-074-0/+7
| | | | | | | | | | | | Delay validation of the content as a feature if it contains a generator expression. It will be checked again at generate-time after evaluation.
| * Features: Add cxx_auto_type.Stephen Kelly2014-04-077-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | cmTarget: Fix listing of source files at configure-time.Stephen Kelly2014-04-135-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit e5da9e51 (cmTarget: Allow any generator expression in SOURCES property., 2014-03-18), source files are computed by true evaluation of generator expressions, including TARGET_OBJECTS. This evaluation requires the presence of cmGeneratorTarget objects since commit bf98cc25 (Genex: Evaluate TARGET_OBJECTS as a normal expression., 2014-02-26). Ensure that we don't attempt to evaluate the TARGET_OBJECTS generator expression at configure-time, as can happen if CMP0024 or CMP0026 are OLD. Use old-style parsing of the source item to extract object target names in that case. Avoid calling GetProperty("SOURCES") to bypass warnings from CMP0051. Refactor existing logic in GetLanguages which is similar in intent to the new GetSourceFiles code.
* | Export: Disallow exported interface includes in src/build tree (#14592).Stephen Kelly2014-04-0926-1/+208
| | | | | | | | | | | | | | | | | | | | | | Allow directories in the source tree or build tree only if the install tree is a subdirectory of the source tree or build tree, as appropriate. Re-use the test files in the RunCMake.include_directories test to run in multiple scenarios. Bump the required CMake version in the test to 3.0 to ensure that the new policy warnings are emitted correctly.
* | RunCMake: Allow specifying the source dir and file to test.Stephen Kelly2014-04-064-3/+8
|/ | | | | | | | | | 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.
* Merge topic 'target-transitive-sources'Brad King2014-04-0316-0/+155
|\ | | | | | | | | | | | | | | | | | | | | 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.
| * target_sources: New command to add sources to target.Stephen Kelly2014-04-024-0/+26
| |
| * Make the SOURCES target property writable.Stephen Kelly2014-04-024-0/+28
| |
| * cmTarget: Make the SOURCES origin tracable.Stephen Kelly2014-04-027-0/+60
| |
| * cmTarget: Make the source files depend on the config.Stephen Kelly2014-04-028-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge topic 'target-sources-refactor'Brad King2014-04-0321-1/+104
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ...
| * | Genex: Only evaluate TARGET_OBJECTS to determine target sources.Stephen Kelly2014-04-029-30/+20
| |/ | | | | | | | | | | | | | | | | | | 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.
| * cmGeneratorTarget: Compute consumed object libraries on demand.Stephen Kelly2014-04-022-0/+8
| | | | | | | | | | | | | | Remove up-front object library computation from cmGlobalGenerator. Adjust tests for message coming from the generator expression evaluation.
| * cmTarget: Allow any generator expression in SOURCES property.Stephen Kelly2014-04-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * cmTarget: Include TARGET_OBJECTS genex in target SOURCES property.Stephen Kelly2014-04-0213-0/+64
| | | | | | | | Add policy CMP0051 to control this behavior.
| * Genex: Evaluate TARGET_OBJECTS as a normal expression.Stephen Kelly2014-03-3110-0/+39
| |
* | Merge topic 'fix_policy_diagnostics'Brad King2014-04-0112-84/+0
|\ \ | |/ |/| | | | | 77b581c2 Policies: omit warnings about unset policies when they are actually set to NEW
| * Policies: omit warnings about unset policies when they are actually set to NEWNils Gladitz2014-03-3112-84/+0
| |
* | Merge topic 'configure_file-unicode'Brad King2014-03-2023-0/+54
|\ \ | | | | | | | | | | | | 98383f80 Unicode: check encoding of files given to configure_file.
| * | Unicode: check encoding of files given to configure_file.Clinton Stimpson2014-03-1723-0/+54
| | | | | | | | | | | | UTF-16 and UTF-32 files are rejected.
* | | Merge topic 'FindPkgConfig_Extend-PKG_CONFIG_PATH_2'Brad King2014-03-207-3/+151
|\ \ \ | | | | | | | | | | | | | | | | | | | | cc5a0d8f FindPkgConfig: More unit tests 453d2b24 FindPkgConfig: small refactoring
| * | | FindPkgConfig: More unit testsDaniele E. Domenichelli2014-03-177-3/+151
| | | |
* | | | Merge topic 'CheckTypeSize_#14056'Brad King2014-03-202-0/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | 7f857775 CheckTypeSize: Add unit test to cover the no-C case 7d6d45f2 CheckTypeSize: Support for CXX when C language is not enabled
| * | | | CheckTypeSize: Add unit test to cover the no-C caseDaniele E. Domenichelli2014-03-172-0/+6
| | | | |
* | | | | Merge topic 'add_custom_command-no-INTERFACE-lib'Brad King2014-03-204-0/+13
|\ \ \ \ \ | |_|/ / / |/| | | / | | |_|/ | |/| | 2600e923 Disallow INTERFACE libraries with add_custom_command(TARGET).
| * | | Disallow INTERFACE libraries with add_custom_command(TARGET).Stephen Kelly2014-03-194-0/+13
| | | | | | | | | | | | | | | | Don't attempt to trace their dependencies.
* | | | Merge topic 'FindPkgConfig_Extend-PKG_CONFIG_PATH'Brad King2014-03-1714-0/+98
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 3df51470 FindPkgConfig: Extend PKG_CONFIG_PATH using CMake variables (#12926)
| * | | | FindPkgConfig: Extend PKG_CONFIG_PATH using CMake variables (#12926)Daniele E. Domenichelli2014-03-1714-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge branch 'master' into CONFIG-LOCATION-CMP0026Brad King2014-03-1764-11/+320
|\ \ \ \ \ | |_|/ / / |/| | / / | | |/ / | |/| |
| * | | Tests: Check find_dependency empty extra argumentsBrad King2014-03-137-0/+22
| | | | | | | | | | | | | | | | Add cases for empty arg 2 and arg 3.
| * | | Tests: Make RunCMake.find_dependency tolerate line number changesBrad King2014-03-133-3/+3
| | | |
| * | | Merge topic 'fix-CMP0046-warning'Brad King2014-03-135-0/+28
| |\ \ \ | | | | | | | | | | | | | | | | | | | | d83245a3 cmTarget: Don't create duplicate backtraces in CMP0046 warning
| * | | | Test error cases in find_dependency.Stephen Kelly2014-03-1114-0/+54
| | |_|/ | |/| |
| * | | Merge topic 'fix-policy-scopes'Brad King2014-03-1014-13/+16
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | 50fd0a33 Tests: Simplify and document policy scopes in RunCMake.CMP* tests b1bbee3e Record more policies on targets when created
| * | | Merge topic 'test-external-cmake'Brad King2014-03-051-4/+4
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variablesBrad King2014-03-031-4/+4
| | | | | | | | | | | | | | | | | | | | s/CMAKE_TEST_GENERATOR/CMAKE_GENERATOR/g
| * | | | FeatureSummary: Add unit testsDaniele E. Domenichelli2014-03-0318-0/+102
| |/ / /
| * | | Tests/RunCMake: Tell cmake not to report unused command-line optionsBrad King2014-02-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Merge topic 'target-SOURCES-refactor'Brad King2014-02-251-7/+7
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f9d5b1fd Handle Mac OSX source flags for individual files lazily. 64d39841 cmGeneratorTarget: Classify sources on demand, not up front. d3682d86 cmGeneratorTarget: Use a method to access the definition file. 5771f81d cmTarget: Add GetTransitiveTargetClosure method. a6dd4990 cmTarget: Create a temporary cmTarget in checkInterfacePropertyCompatibility b8b99cc1 cmTarget: Avoid computing languages when computing transitive targets. 01bca553 cmTarget: Move ComputeLinkInterface to the internal class. d93e1af2 cmTarget: Extract a ComputeLinkInterfaceLibraries method. 3bcb197c cmTarget: Re-arrange the ComputeLinkInterface method. 326d07d2 cmTarget: Extract a ComputeLinkImplementationLanguages method. 21e91350 cmTarget: Change GetTransitivePropertyLinkLibraries to output targets. f81eb49e cmTarget: Find source files on request. 84e5f5a0 cmTarget: Move SourceFileFlags to cmGeneratorTarget.