summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Drop Visual Studio 6 generatorBrad King2016-03-0930-148/+42
| | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* Merge topic 'add-FindLTTngUST'Brad King2016-03-095-1/+64
|\ | | | | | | | | a4194deb Add FindLTTngUST module to find LTTng-UST library
| * Add FindLTTngUST module to find LTTng-UST libraryPhilippe Proulx2016-03-075-1/+64
| | | | | | | | | | | | | | Also detect the library version number. Provide results as variables and as an imported target, LTTng::UST. Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
* | Diagnose recursive project/enable_language without crashing (#15999)Brad King2016-03-0711-0/+27
|/ | | | | | | Calling `project()` or `enable_language()` from a toolchain file will infinitely recurse since those commands load the toolchain file. Diagnose and reject this case with an error message instead of crashing when the stack eventually overflows.
* Merge topic 'update-osx-release'Brad King2016-03-071-1/+1
|\ | | | | | | | | b682debd Utilities/Release: Switch to OS X 10.7 and Qt 5.5 for Mac binary
| * Utilities/Release: Switch to OS X 10.7 and Qt 5.5 for Mac binaryBrad King2016-02-191-1/+1
| | | | | | | | | | Use a new build machine to produce the OS X binary targeting OS X 10.7 and using Qt 5.5.
* | VS: Add option to set `ConfigurationType` of a .vcxproj fileFabian Otto2016-02-266-0/+37
| | | | | | | | | | | | Add a VS_CONFIGURATION_TYPE target property to set this value explicitly. This is useful to build a Windows Kernel Mode Driver, for example.
* | Merge topic 'try_compile-target-type'Brad King2016-02-267-0/+41
|\ \ | | | | | | | | | | | | 7f1bd9fe try_compile: Add option to control type of target
| * | try_compile: Add option to control type of targetBrad King2016-02-197-0/+41
| | | | | | | | | | | | | | | | | | | | | Create a `CMAKE_TRY_COMPILE_TARGET_TYPE` option to specify use of `add_library(... STATIC ...)` for the generated test project. This will be useful for cross-compiling toolchains that cannot link a binary without custom flags or scripts.
* | | file(DOWNLOAD): Fill STATUS variable on hash mismatch (#15987)Brad King2016-02-255-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Although we fail with an error on a hash mismatch, it is not a fatal error so the script may continue processing. If the download itself had no error then report in the STATUS variable that the operation was not successful due to the hash mismatch. Suggested-by: Tobias Hieta <tobias@hieta.se>
* | | cmake_parse_arguments: Additional regression testsDimitar Yordanov2016-02-242-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add regression tests for the arguments handling in cmake_parse_arguments. The tests were run also against cmake 3.4.1 maint branch to verify that there are no regressions. Signed-off-by: Dimitar Yordanov <dimitar.yordanov@sap.com> Signed-off-by: Matthias Maennich <matthias.maennich@sap.com>
* | | Merge topic 'test-XCTest-sdkroot'Brad King2016-02-241-1/+1
|\ \ \ | | | | | | | | | | | | | | | | d8cba536 Tests: Fix XCTest when ENV{SDKROOT} is set
| * | | Tests: Fix XCTest when ENV{SDKROOT} is setBrad King2016-02-191-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | We use the host OS X version as the deployment target for this test. This breaks if the SDKROOT environment variable specifies an incompatible SDK version. Explicitly specify `macosx` as the SDK so that CMake will automatically select a version matching the deployment target.
* | | Merge topic 'test-FindPackageModeMakefileTest-optionally'Brad King2016-02-241-1/+2
|\ \ \ | | | | | | | | | | | | | | | | c05678ad Tests: Add option to disable FindPackageModeMakefileTest
| * | | Tests: Add option to disable FindPackageModeMakefileTestBrad King2016-02-191-1/+2
| |/ / | | | | | | | | | | | | This test does not work in all environments, so add an option to disable it.
* | | Merge topic 'revert-automoc-src-per-dir'Brad King2016-02-245-27/+1
|\ \ \ | |_|/ |/| | | | | | | | 091b649e Revert "Automoc: Fix support of files with the same name (#12873)"
| * | Revert "Automoc: Fix support of files with the same name (#12873)"Brad King2016-02-195-27/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9beb2744d7685fca9cd5717308d4457dffdefcdc. Our AUTOMOC documentation states that it should be possible to `#include "moc_foo.cpp"` in `foo.cpp`, and this will not work if the file is placed in a different directory. Another solution will need to be found to the original problem. Reported-by: Stephen Kelly <steveire@gmail.com>
* | | Merge topic 'unix-timestamps'Brad King2016-02-192-0/+28
|\ \ \ | |_|/ |/| | | | | | | | 6727270b CMake: Extend TIMESTAMP sub-commands with new unix time format specifier
| * | CMake: Extend TIMESTAMP sub-commands with new unix time format specifierJose-Luis Blanco-Claraco2016-02-182-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | The new `%s` format specifier is substituted by file()/string() `TIMESTAMP` sub-commands with the number of seconds since unix-epoch (1970-01-01 00:00:00 UTC). Co-Author: Nils Gladitz <nilsgladitz@gmail.com>
* | | Merge topic 'fix-static-private-non-target-depends'Brad King2016-02-185-0/+17
|\ \ \ | | | | | | | | | | | | | | | | 87f44b75 Fix export of STATIC library PRIVATE non-target dependencies
| * | | Fix export of STATIC library PRIVATE non-target dependenciesBrad King2016-02-175-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit v3.5.0-rc1~43^2 (Fix export of STATIC library PRIVATE dependencies with CMP0022 NEW, 2016-01-15) we taught target_link_libraries to generate `$<LINK_ONLY:$<TARGET_NAME:dep>>` in INTERFACE_LINK_LIBRARIES instead of `$<LINK_ONLY:dep>` so that `dep` can be recognized as a target name and updated during export. However, this approach does not work when `dep` is just a plain library name and not a target because `$<TARGET_NAME:...>` requires the name of a reachable target. Since we do not know during target_link_libraries whether the name will correspond to a reachable target or not, we cannot inject the `$<TARGET_NAME:...>` expression. Revert this change and solve the original problem instead by teaching the export logic to recognize and update target names directly in `$<LINK_ONLY:...>` expressions. Reported-by: Ben Boeckel <ben.boeckel@kitware.com>
* | | | Merge topic 'automoc-src-per-dir'Brad King2016-02-185-1/+27
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | 9beb2744 Automoc: Fix support of files with the same name (#12873)
| * | | Automoc: Fix support of files with the same name (#12873)Mariusz Pluciński2016-02-165-1/+27
| | |/ | |/|
* | | FindProtobuf: check versionAntonio Perez Barrero2016-02-161-0/+1
|/ / | | | | | | | | | | | | Check found libraries version to match user required version. Protobuf compiler executable version is checked to be aligned with found libraries, raising a warning message otherwise.
* | Merge topic 'fix-cmake_parse_arguments-expansion'Brad King2016-02-161-0/+19
|\ \ | | | | | | | | | | | | c8c45a2c cmake_parse_arguments: Restore ;-list argument flattening
| * | cmake_parse_arguments: Restore ;-list argument flatteningDimitar Yordanov2016-02-121-0/+19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The re-implementation in commit v3.5.0-rc1~116^2~1 (CMakeParseArguments: replace by native cmake_parse_arguments command, 2015-12-05) introduced a regression when parsing the ARGN arguments with cmake_parse_arguments. The original implementation used foreach(currentArg ${ARGN}) to iterate over input arguments. This flattened ;-lists within the arguments whether they were quoted or not. Fix our new implementation to preserve this behavior and add a test case to cover it. Signed-off-by: Dimitar Yordanov <dimitar.yordanov@sap.com> Signed-off-by: Matthias Maennich <matthias.maennich@sap.com>
* | Merge topic 'cpack-rpm-upper-cased-components'Brad King2016-02-1610-23/+105
|\ \ | | | | | | | | | | | | 7c7efd1e CPack/RPM support for upper cased component variables
| * | CPack/RPM support for upper cased component variablesDomen Vrankar2016-02-1310-23/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CPACK_* variables expect component name in upper case. CPACK_RPM_* variables expected component name to be in same case as component name. This patch adds support for CPACK_RPM_* variables with upper case component names to match the convention with CPACK_* variables and also preserves same case component names for back compatibility.
* | | Tests: fix GenerateExportHeader directory definitionsBen Boeckel2016-02-122-9/+6
|/ / | | | | | | | | | | There's no need to stringify the values, but instead just pass in strings. The core problem is that the path may have tokens which are replaced by the preprocessor which causes an invalid path to be used.
* | Merge topic 'apple-isystem-gcc'Brad King2016-02-092-2/+4
|\ \ | | | | | | | | | | | | | | | 5b04aa31 Xcode: Disable test for system include dirs 2cae5128 Apple: Enable -isystem for GNU Compiler >= 4 (#15953)
| * | Xcode: Disable test for system include dirsGregor Jasny2016-02-082-2/+4
| | |
* | | Merge topic 'install-EXCLUDE_FROM_ALL'Brad King2016-02-0910-0/+60
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 586e56d0 Help: Add notes for topic 'install-EXCLUDE_FROM_ALL' d321c196 Tests: Add cases for install() command EXCLUDE_FROM_ALL option 18ce97c4 install: Add EXCLUDE_FROM_ALL option (#14921)
| * | | Tests: Add cases for install() command EXCLUDE_FROM_ALL optionBrad King2016-02-0410-0/+60
| | |/ | |/|
* | | Merge topic 'test-ctest_submit-update'Brad King2016-02-094-4/+4
|\ \ \ | | | | | | | | | | | | | | | | 2859d9ef Tests: Extend ctest_submit host lookup failure matching (#15958)
| * | | Tests: Extend ctest_submit host lookup failure matching (#15958)Orion Poplawski2016-02-084-4/+4
| |/ / | | | | | | | | | | | | | | | | | | Match this message: Could not resolve host: -no-site-; Name or service not known ^^^^^^^^^^^^^^^^^^^^^^^^^^^
* | | Merge topic 'fix-install-EXPORT-crash'Brad King2016-02-097-3/+14
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | a1ad098d Tests: Avoid OS X 10.5 limitation warning in RunCMake.install test 47460f3e install(EXPORT): Fix crash on target in another directory e86383e1 Tests: Use newer policy settings in RunCMake.install test
| * | | Tests: Avoid OS X 10.5 limitation warning in RunCMake.install testBrad King2016-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EXPORT-OldIFace test case uses install(TARGETS) and so generates a warning: CMake Warning in CMakeLists.txt: WARNING: Target "foo" has runtime paths which cannot be changed during install. To change runtime paths, OS X version 10.6 or newer is required. Therefore, runtime paths will not be changed when installing. CMAKE_BUILD_WITH_INSTALL_RPATH may be used to work around this limitation. Set CMAKE_BUILD_WITH_INSTALL_RPATH to avoid the warning since we do not need to run the binaries from the build tree anyway.
| * | | install(EXPORT): Fix crash on target in another directoryBrad King2016-02-053-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring merged by commit v3.5.0-rc1~299 (Merge topic 'use-generator-target', 2015-10-20) in and around commit v3.5.0-rc1~299^2~13 (cmExportSet: Store a cmGeneratorTarget, 2015-10-17) changed export sets to delay looking up actual targets and stores only their names. However, in InstallCommand::HandleExportMode we need to lookup targets immediately to check them for EXPORT_LINK_INTERFACE_LIBRARIES. The check was accidentally made local to the current directory, so if an export set contains a target from another directory the lookup fails and CMake crashes. Fix the check to look up the target name globally, and tolerate when no target is found just in case. Reported-by: Kelly Thompson <kgt@lanl.gov>
| * | | Tests: Use newer policy settings in RunCMake.install testBrad King2016-02-054-3/+4
| |/ / | | | | | | | | | In particular, avoid CMP0042 warnings on OS X.
* | | Merge topic 'test-FortranCInterface-again'Brad King2016-02-081-2/+2
|\ \ \ | | | | | | | | | | | | | | | | d31d7ffd Tests: Fix Fortran test to run FortranCInterface again
| * | | Tests: Fix Fortran test to run FortranCInterface againBrad King2016-02-051-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates to Tests/Fortran by commit v3.2.0-rc1~501^2 (Avoid if() quoted auto-dereference, 2014-10-14) changed our check "${CMAKE_Fortran_COMPILER_ID}" MATCHES "${CMAKE_C_COMPILER_ID}" to CMAKE_Fortran_COMPILER_ID MATCHES CMAKE_C_COMPILER_ID because CMP0054 warned about the LHS compiler id "MSVC" being expanded. However, the RHS of if(MATCHES) does not auto-dereference so this check has returned FALSE since then and the FortranCInterface part of the test has not been running! Fix this by using STREQUAL with quoted arguments and setting CMP0054 to NEW (by requiring 3.1).
* | | Merge topic 'fix-Fortran-module-in-subdir'Brad King2016-02-085-1/+7
|\ \ \ | | | | | | | | | | | | | | | | c5eb21b6 Fix dependency scanning configuration in subdirectories
| * | | Fix dependency scanning configuration in subdirectoriesBrad King2016-02-055-1/+7
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit v3.5.0-rc1~347^2~2 (Set the current dirs on the snapshot before creating the cmMakefile) accidentally changed the source and binary directories configured in `cmake -E cmake_depends` for use during dependency scanning. This can cause the wrong directory information to be loaded. It also breaks Fortran module dependency scanning for modules provided by targets in subdirectories that do not have Fortran_MODULE_DIRECTORY set. Fix the dependency scanning directory configuration and add a test to cover the Fortran module case in which the breakage was observed. Reported-by: Kelly Thompson <kgt@lanl.gov>
* | | Merge topic 'error-multiple-targets'Brad King2016-02-084-0/+8
|\ \ \ | |_|/ |/| | | | | | | | | | | 497cad7c cmake: Teach --build to reject multiple --target options 886acd80 Help: Fix reference to `cmake --build` in cmake(1) manual
| * | cmake: Teach --build to reject multiple --target optionsSebastian Schuberth2016-02-054-0/+8
| |/ | | | | | | | | | | | | | | | | | | Previously we did not clearly document that `--target` is only supported to be specified once. Even worse, specifying it multiple times would silently ignore any previously specified targets and only build the last target. Update the documentation to specify this. Update the implementation to reject multiple `--target` options to prevent user errors.
* | list: Add FILTER subcommand (#3986)Ashley Whetter2016-02-0325-0/+61
|/ | | | Create a `list(FILTER)` command to filter lists by regular expression.
* Merge topic 'fix-CMAKE_MATCH-self-match'Brad King2016-02-022-0/+6
|\ | | | | | | | | 6ffc4323 cmConditionEvaluator: Fix matching of `CMAKE_MATCH_*` values (#15944)
| * cmConditionEvaluator: Fix matching of `CMAKE_MATCH_*` values (#15944)Brad King2016-02-012-0/+6
| | | | | | | | | | | | | | | | | | | | | | While evaluating `if(MATCHES)` we get a `const char*` pointer to the string to be matched. On code like if(CMAKE_MATCH_COUNT MATCHES "Y") the string to be matched may be owned by our own result variables. We must move the value to our own buffer before clearing them. Otherwise we risk reading freed storage.
* | add_custom_command: Clarify error when TARGET is out of scope (#15681)Brad King2016-01-2810-2/+19
|/ | | | | | | | The add_custom_command(TARGET) signature only works for targets defined in the current directory. Clarify this in the error message when the target exists but was defined elsewhere. Inspired-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
* Merge topic 'test-fltk_wrap_ui'Brad King2016-01-223-4/+7
|\ | | | | | | | | f98ae28e Tests: Cover fltk_wrap_ui on an executable that links libraries