summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Replace string(REGEX REPLACE) with string(REPLACE) where possibleRolf Eike Beer2014-04-143-6/+6
| | | | The simple replacement is much faster.
* Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)Rolf Eike Beer2014-04-141-2/+2
| | | | | | The matches have already been calculated and can simply be taken from CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very similar regular expressions.
* Merge topic 'install-prefix-in-interface'Brad King2014-04-1030-4/+216
|\ | | | | | | | | | | 783bce29 Export: Disallow exported interface includes in src/build tree (#14592). c869984e RunCMake: Allow specifying the source dir and file to test.
| * 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.
* | Tests: Fix CTestTestFailedSubmit-ftp with OS X system libcurlAlex Ciobanu2014-04-031-0/+1
|/ | | | | | | | | 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.
* Merge topic 'target-transitive-sources'Brad King2014-04-0334-1/+332
|\ | | | | | | | | | | | | | | | | | | | | 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-028-1/+38
| |
| * cmTarget: Make the SOURCES origin tracable.Stephen Kelly2014-04-027-0/+60
| |
| * cmTarget: Allow transitive evaluation of SOURCES property.Stephen Kelly2014-04-0210-1/+52
| | | | | | | | | | | | | | 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.
| * cmTarget: Make the source files depend on the config.Stephen Kelly2014-04-0218-1/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0326-2/+127
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0213-102/+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-022-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * cmStringCommand: Add GENEX_STRIP subcommand.Stephen Kelly2014-03-311-0/+6
| | | | | | | | Strip out any generator expressions in the input string.
| * Genex: Evaluate TARGET_OBJECTS as a normal expression.Stephen Kelly2014-03-3114-0/+111
| |
| * cmSourceFileLocation: Collapse full path for directory comparisons.Stephen Kelly2014-03-313-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | 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 'fix-CTestTestMemcheck-xcode2-missing-dirs'Brad King2014-03-272-14/+21
|\ \ | | | | | | | | | | | | 27b81213 Tests/CTestTestMemcheck: Help Xcode 2.x create output dirs
| * | Tests/CTestTestMemcheck: Help Xcode 2.x create output dirsBrad King2014-03-262-14/+21
| | | | | | | | | | | | | | | Add the PRE_BUILD step to all targets that need it so the output directories get created no matter which target is built first.
* | | Merge topic 'fix-Qt-Autogen'Brad King2014-03-266-2/+74
|\ \ \ | | | | | | | | | | | | | | | | | | | | 71a11252 QtAutogen: Fix use of multiple ui files in a single target. 261acd91 QtAutogen: Use the basename for resource files.
| * | | QtAutogen: Fix use of multiple ui files in a single target.Stephen Kelly2014-03-254-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | QtAutogen: Use the basename for resource files.Stephen Kelly2014-03-253-1/+8
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Qt4: Fix moc command dependencies for incremental build.Stephen Kelly2014-03-214-0/+57
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | 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
* | 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 'ExternalProject-no-download-progress'Brad King2014-03-201-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | f1b953ec Help: Add notes for topic 'ExternalProject-no-download-progress' 7d35b550 ExternalProject: Add option to disable download progress (#14807)
| * | | ExternalProject: Add option to disable download progress (#14807)Brad King2014-03-171-0/+1
| | | | | | | | | | | | | | | | | | | | Add a DOWNLOAD_NO_PROGRESS option to disable progress reports while downloading source tarballs.
* | | | 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 'fix-AllFindModules-test-module-path'Brad King2014-03-201-0/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | cf3e87e1 Tests: Teach CMakeOnly.AllFindModules to tolerate a system KDE4
| * | | | | Tests: Teach CMakeOnly.AllFindModules to tolerate a system KDE4Brad King2014-03-191-0/+3
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge topic 'add_custom_command-DEPENDS-genex'Brad King2014-03-201-2/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | bbffccca add_custom_command: Evaluate generator expressions in DEPENDS
| * | | | | add_custom_command: Evaluate generator expressions in DEPENDSStephen Kelly2014-03-201-2/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rely on evaluation in cmCustomCommandGenerator for the generators. When tracing target dependencies, depend on the union of dependencies for all configurations.
* | | | | Merge topic 'fix-out-of-date-CTestTestMemcheck'Brad King2014-03-201-1/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 84a42304 Tests: Prevent unnecessary rebuilds in CTestTestMemcheck
| * | | | | Tests: Prevent unnecessary rebuilds in CTestTestMemcheckDavid Cole2014-03-201-1/+6
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | 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-17122-187/+726
|\ \ \ \ \ | |_|/ / / |/| | / / | | |/ / | |/| |
| * | | 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