summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'target_compile_features'Brad King2014-04-1574-2/+416
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Export: Populate INTERFACE_COMPILE_FEATURES property.Stephen Kelly2014-04-083-1/+22
| |
| * Add target_compile_features command.Stephen Kelly2014-04-0742-0/+192
| | | | | | | | | | | | | | | | | | | | | | 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-0714-0/+70
| | | | | | | | | | | | | | | | | | | | | | 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-075-0/+12
| | | | | | | | | | | | 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-0712-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add CXX_STANDARD and CXX_EXTENSION target properties.Stephen Kelly2014-04-075-0/+54
| | | | | | | | | | These are used to determine whether to add -std=c++11, -std=gnu++11 etc flags on the compile line.
| * Add some COMPILE_OPTIONS for specifying C++ dialect.Stephen Kelly2014-04-071-0/+4
| | | | | | | | | | These are compiler-specific, compiler version specific, extension specific and standard version specific.
| * Tests: Require CMake 3.0 for the SystemInformation test.Stephen Kelly2014-04-071-1/+1
| | | | | | | | Correctly identify AppleClang.
* | Merge topic 'matches-cleanup'Brad King2014-04-1510-17/+17
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | f21ac16e Replace MATCHES test on numbers with EQUAL test 7eacbaed Replace MATCHES ".+" tests with NOT STREQUAL "" 3a71d34c Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient b0b4b460 Remove .* expressions from beginning and end of MATCHES regexs 5bd48ac5 Replace string(REGEX REPLACE) with string(REPLACE) where possible 2622bc3f Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
| * | Replace MATCHES test on numbers with EQUAL testRolf Eike Beer2014-04-142-2/+2
| | | | | | | | | | | | | | | The MATCHES tests were actually wrong, as "a4b" and "42" would also cause a match when it should not.
| * | Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficientRolf Eike Beer2014-04-141-1/+1
| | |
| * | Remove .* expressions from beginning and end of MATCHES regexsRolf Eike Beer2014-04-145-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | All these expressions work the same: "foo" ".*foo.*" "^.*foo.*$" This assumes that the "Intel*" expressions were meant to be "Intel.*".
| * | 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.
* | | 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.
* | 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
| | | | |