summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* cmListFileBacktrace: Refactor storage to provide efficient value semanticsBrad King2016-04-187-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.4.0-rc1~321^2~2 (Genex: Store a backtrace, not a pointer to one, 2015-07-08) we treat cmListFileBacktrace instances as lightweight values. This was true at the time only because the backtrace information was kept in the cmState snapshot hierarchy. However, that forced us to accumulate a lot of otherwise short-lived snapshots just to have the backtrace fields available for reference by cmListFileBacktrace instances. Recent refactoring made backtrace instances independent of the snapshot hierarchy to avoid accumulating short-lived snapshots. This came at the cost of making backtrace values heavy again, leading to lots of string coying and slower execution. Fix this by refactoring cmListFileBacktrace to provide value semantics with efficient shared storage underneath. Teach cmMakefile to maintain its call stack using an instance of cmListFileBacktrace. This approach allows the current backtrace to be efficiently saved whenever it is needed. Also teach cmListFileBacktrace the notion of a file-level scope. This is useful for messages about the whole file (e.g. during parsing) that are not specific to any line within it. Push the CMakeLists.txt scope for each directory and never pop it. This ensures that we always have some context information and simplifies cmMakefile::IssueMessage. Push/pop a file-level scope as each included file is processed. This supersedes cmParseFileScope and improves diagnostic message context information in a few places. Fix the corresponding test cases to expect the improved output.
* Merge topic 'try_compile-config-flags'Brad King2016-04-133-0/+21
|\ | | | | | | | | | | bd581a37 try_compile: Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes (#16054) 82ef90fc cmCoreTryCompile: Factor out config lookup for re-use
| * try_compile: Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes (#16054)Brad King2016-04-113-0/+21
| | | | | | | | | | | | | | | | In the `try_compile` source file signature we propagate the caller's value of `CMAKE_<LANG>_FLAGS` into the test project. Extend this to propagate `CMAKE_<LANG>_FLAGS_<CONFIG>` too instead of always using the default value in the test project. This will be useful, for example, to allow the MSVC runtime library to be changed (e.g. `-MDd` => `-MTd`).
* | Add options to run clang-tidy with the compilerDaniel Pfeifer2016-04-1315-1/+62
|/ | | | | | Create a <LANG>_CLANG_TIDY target property (initialized by a CMAKE_<LANG>_CLANG_TIDY variable) to specify a clang-tidy command line to be run along with the compiler.
* Merge topic 'test-RunCMake.BuildDepends-filesystem-workaround'Brad King2016-04-111-0/+1
|\ | | | | | | | | f5e79004 Tests: Work around filesystem timestamp bugs in RunCMake.BuildDepends
| * Tests: Work around filesystem timestamp bugs in RunCMake.BuildDependsBrad King2016-04-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Custom-Symbolic-and-Byproduct case fails strangely on some filesystems used by our nightly testing. Somehow on the first build the `use-byproduct` output ends up with a timestamp older than `gen-byproduct-stamp` even though the build log clearly shows them build in the correct order (and must according to build system dependencies). Work around this problem by adding an extra delay before building `use-byproduct`. Tested-by: Gerhard Grimm <gerhard.grimm@detec.com>
* | Merge topic 'ninja-restat-custom-command-byproducts'Brad King2016-04-082-0/+29
|\ \ | |/ | | | | | | | | add7abc8 Ninja: Restat custom command byproducts even with a SYMBOLIC output (#16049) ff805113 Ninja: Fix detection of custom command symbolic outputs
| * Ninja: Restat custom command byproducts even with a SYMBOLIC output (#16049)Brad King2016-04-052-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change in commit v3.5.0-rc1~198^2 (Ninja: Always re-run custom commands that have symbolic dependencies, 2015-11-19) broke the byproducts feature added by commit v3.2.0-rc1~340^2~2 (Add an option for explicit BYPRODUCTS of custom commands, 2014-11-13) when SYMBOLIC outputs also appear. This case occurs with AUTORCC-generated custom targets because the output is SYMBOLIC (to always run) and the generated file is a byproduct (for restat so dependents do not run unnecessarily). The two use cases conflict because Ninja does not support per-output restat. Favor restat whenever byproducts are present because it is required for byproducts to work correctly. In use cases where we want an always-run chain we simply will not be able to also use byproducts.
| * Merge branch 'fix-repeat-pkg-config' into releaseBrad King2016-03-211-5/+6
| |\
* | \ Merge topic 'cmake-depend-in-project-only'Brad King2016-03-245-0/+29
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | b06e17da Help: Add notes for topic 'cmake-depend-in-project-only' 52540245 Tests: Add test for CMAKE_DEPENDS_IN_PROJECT_ONLY variable b1e1aa1e Makefile: Optionally scan only source and build trees for dependencies
| * | | Tests: Add test for CMAKE_DEPENDS_IN_PROJECT_ONLY variableBrad King2016-03-235-0/+29
| | | |
* | | | Merge topic 'vs-startup-project'Brad King2016-03-2410-1/+54
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ad140c6e VS: Put ALL_BUILD in the PREDEFINED_TARGETS_FOLDER f069be05 VS: Fix default target support for targets nested inside a folder c05ea485 VS: Improve unit test macros 78ec0461 VS: Add option to choose the `.sln` startup project (#15578)
| * | | | VS: Fix default target support for targets nested inside a folderTaylor Braun-Jones2016-03-234-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | It's not actually the first target in a `.sln` file that is treated as the default startup project, but rather the first fully defined target.
| * | | | VS: Improve unit test macrosTaylor Braun-Jones2016-03-223-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Change `getFirstProject` macro to more flexible version `getProjectNames`
| * | | | VS: Add option to choose the `.sln` startup project (#15578)Davy Durham2016-03-227-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a `VS_STARTUP_PROJECT` directory property to specify the project that should be placed first in the `.sln` file so that it will be selected as the default startup project. Co-Author: Taylor Braun-Jones <taylor.braunjones@avigilon.com>
* | | | | Merge topic 'timeout_after_match'Brad King2016-03-2210-0/+53
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | de7afd29 Help: Add notes for topic 'timeout_after_match' 993e48d0 CTest: Optionally use a secondary test timeout after matching output
| * | | | CTest: Optionally use a secondary test timeout after matching outputZack Galbreath2016-03-2210-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow a test N seconds to complete after we detect a matching line in its output. Activate this behavior with a new TIMEOUT_AFTER_MATCH test property.
* | | | | Merge topic 'test-rename-VSSolution'Brad King2016-03-2218-1/+1
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | 5c1f4da8 Tests: Rename RunCMake.{SolutionGlobalSections => VSSolution}
| * | | | Tests: Rename RunCMake.{SolutionGlobalSections => VSSolution}Brad King2016-03-1818-1/+1
| | | | | | | | | | | | | | | | | | | | The test will be suitable for covering other `.sln` content too.
* | | | | Merge topic 'ninja-directory-targets'Brad King2016-03-224-0/+21
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9ead71df Help: Add notes for topic 'ninja-directory-targets' e9bf8ec8 Ninja: Add test for `$subdir/all` targets ca575fe9 Ninja: Add `$subdir/all` targets
| * | | | | Ninja: Add test for `$subdir/all` targetsBrad King2016-03-224-0/+21
| |/ / / /
* | | | | Merge topic 'fix-repeat-pkg-config'Brad King2016-03-221-5/+6
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| | 6f4f9054 FindPkgConfig: set correctly named variables in cache (#15903)
| * | | FindPkgConfig: set correctly named variables in cache (#15903)Ben Boeckel2016-03-211-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix in commit v3.5.0-rc1~27^2 (FindPkgConfig: set standard variables in the cache, 2016-01-20) added the wrong variable name to the cache. The test was only testing that the cache variable existed, not that it also had the correct value. Update the test to ensure that the cache value matches the local variable value. Reported-by: Bernd Lörwald
* | | | Merge topic 'ios-install-combined-one-arch'Brad King2016-03-173-0/+64
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| e3fc2899 Fix iOS combined feature for single architecture targets
| * | Fix iOS combined feature for single architecture targetsRuslan Baratov2016-03-153-0/+64
| |/ | | | | | | | | | | | | If list of valid target architectures is empty for given SDK then there will be no VALID_ARCHS build setting returned by Xcode. Return "" (empty string) explicitly in this case. This may happens if CMAKE_IOS_INSTALL_COMBINED is ON but only one architecture used in target.
| * Merge branch 'fix-static-private-non-target-depends' into releaseBrad King2016-02-175-0/+17
| |\
| * \ Merge branch 'fix-cmake_parse_arguments-expansion' into releaseBrad King2016-02-121-0/+19
| |\ \
| * \ \ Merge branch 'fix-install-EXPORT-crash' into releaseBrad King2016-02-087-3/+14
| |\ \ \
* | \ \ \ Merge topic 'remove-vs6-generator'Brad King2016-03-108-19/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b42866a3 Drop Visual Studio 6 generator cd9ba3ec cmLocalVisualStudio7Generator: Fix name of helper function
| * | | | | Drop Visual Studio 6 generatorBrad King2016-03-098-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* | | | | | Xcode: ReRunCMake even if files disappeared (#15992)Gregor Jasny2016-03-091-0/+39
|/ / / / /
* | | | | 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.
* | | | | 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 '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 '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>
* | | | CPack/RPM support for upper cased component variablesDomen Vrankar2016-02-137-12/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | 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.