summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'remove-needless-copies'Brad King2016-05-271-1/+1
|\ | | | | | | | | | | 27ead963 Remove unnecessary local copies. 618fb23f Pass arguments that are not modified as const&.
| * Pass arguments that are not modified as const&.Daniel Pfeifer2016-05-261-1/+1
| | | | | | | | | | | | | | Use clang-tidy's performance-unnecessary-value-param checker to find value parameter declarations of expensive to copy types that are not modified inside the function. Ignore findings in kwsys. After applying the fix-its, manually change `const T&` to `T const&`.
* | Remove redundant c_str() calls.Daniel Pfeifer2016-05-262-9/+9
|/ | | | | Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
* try_compile: Optionally forward custom platform variables to test projectBrad King2016-05-252-0/+27
| | | | | | | | | Add a `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable to specify a list of custom variables to be forwarded to a `try_compile` test project. This will be useful for platform information modules or toolchain files to forward some platform-specific set of variables from the host project (perhaps set in its cache) to the test project so that it can build the same way.
* Merge topic 'standard-include-directories'Brad King2016-05-254-0/+11
|\ | | | | | | | | | | | | c1340827 Add a variable to specify language-wide system include directories 44199097 cmMakefile: Optimize AddSystemIncludeDirectories for empty set a896043b GHS: Compute include directories consistently with other generators
| * Add a variable to specify language-wide system include directoriesBrad King2016-05-254-0/+11
| | | | | | | | | | | | | | Create a `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` variable to specify system include directories for for `<LANG>` compiler command lines. This plays a role for include directories as the existing `CMAKE_<LANG>_STANDARD_LIBRARIES` variable does for link libraries.
* | Merge topic 'cpack-deb-different-package-names'Brad King2016-05-2419-13/+43
|\ \ | | | | | | | | | | | | adbd3985 CPack/Deb possibility to change package name
| * | CPack/Deb possibility to change package nameDomen Vrankar2016-05-2319-13/+43
| |/ | | | | | | | | | | | | | | This patch preserves backward compatibility of deb package names with previous CMake versions but similarly to CPack/RPM allows to change package name format and supports DEB-DEFAULT setting that produces proper Debian package names.
* | CPack/Deb prevent accidental component dependenciesDomen Vrankar2016-05-232-0/+2
|/ | | | | | | | | | Prevent accidental inter component dependency setting since this is a breaking feature in situations where another CPack module is already using the feature. It should be enabled if desired since it can cause issues when upgrading only one of the components for e.g. configuration instead of all the components at once.
* Merge topic 'ninja-output-path-prefix'Brad King2016-05-1921-0/+328
|\ | | | | | | | | | | | | | | | | | | | | | | | | eb076692 Tests: Select RunCMake.Ninja test cases based on ninja version 8a862a4d Ninja: Support embedding of CMake as subninja project 038e7716 Ninja: Pass all build paths through a central method 7c26a6a2 Ninja: Fix path to soname-d target file ac3cdd9a Ninja: Convert object file names to ninja paths earlier d4381cb1 Ninja: Convert link library file names like all other output paths 0397c92a Ninja: Pre-compute "CMakeCache.txt" build target name 3b3ecdfa Ninja: Pre-compute "all" build target name 5ca72750 Ninja: Simplify generation of custom target logical path
| * Tests: Select RunCMake.Ninja test cases based on ninja versionBrad King2016-05-181-0/+20
| | | | | | | | | | Some test cases need features not available in Ninja < 1.6, so check the version before running them.
| * Ninja: Support embedding of CMake as subninja projectNicolas Despres2016-05-1721-0/+308
| | | | | | | | | | | | Add a `CMAKE_NINJA_OUTPUT_PATH_PREFIX` variable. When it is set, CMake generates a `build.ninja` file suitable for embedding into another ninja project potentially generated by an alien generator.
* | ExternalProject: Always run update step with non-empty UPDATE_COMMANDBrad King2016-05-181-0/+12
| | | | | | | | | | | | | | | | The purpose of the `update` step is to run an update on each build (subject to `UPDATE_DISCONNECTED`). This is done for version-controlled source directories. We should do it for a custom `UPDATE_COMMAND` too. In particular, when `UPDATE_DISCONNECTED` is used we expect the `skip-update` step to exist.
* | Merge topic 'file-glob-sort'Brad King2016-05-183-9/+0
|\ \ | | | | | | | | | | | | edcccde7 file: Sort GLOB results to make it deterministic (#14491)
| * | file: Sort GLOB results to make it deterministic (#14491)Reiner Herrmann2016-05-173-9/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though the `file(GLOB)` documentation specifically warns against using it to collect a list of source files, projects often do it anyway. Since it uses `readdir()`, the list of files will be unsorted. This list is often passed directly to add_executable / add_library. Linking binaries with an unsorted list will make it unreproducible, which means that the produced binary will differ depending on the unpredictable `readdir()` order. To solve those reproducibility issues in a lot of programs (which don't explicitly `list(SORT)` the list manually), sort the resulting list of the `file(GLOB)` command. A more detailed rationale about reproducible builds is available [here](https://reproducible-builds.org/).
* | GHS: Use shorter object file names on collisionGeoff Viola2016-05-184-1/+20
|/
* Revise C++ coding style using clang-formatKitware Robot2016-05-16668-5444/+5326
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* Merge topic 'findpkgconfig-target'Brad King2016-05-162-0/+27
|\ | | | | | | | | df97b979 FindPkgConfig: optionally create imported target for the found libraries
| * FindPkgConfig: optionally create imported target for the found librariesRolf Eike Beer2016-05-142-0/+27
| |
* | Merge topic 'cpack-rpm-adding-dist-to-release-tag'Brad King2016-05-164-0/+21
|\ \ | | | | | | | | | | | | | | | f5089cfc CPack/RPM adding dist to release tag test f7003a60 CPack/RPM release dist tag support
| * | CPack/RPM adding dist to release tag testDomen Vrankar2016-05-144-0/+21
| |/ | | | | | | Tests and release notes
* | Merge topic 'cpack-rpm-different-package-names'Brad King2016-05-165-1/+25
|\ \ | | | | | | | | | | | | 44ee2d71 CPack/RPM different package names
| * | CPack/RPM different package namesDomen Vrankar2016-05-155-1/+25
| |/ | | | | | | | | | | | | | | Packagers may now set their own rpm package file names or request that rpmbuild tool chooses one for them. It also supports handing of situations where one spec file may produce multiple rpm packages.
* | Merge topic 'cpack-deb-improvements'Brad King2016-05-1627-29/+211
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | 4461e8bb CPack/Deb cpack-deb-improvements release notes 7e940bf7 CPack/Deb test changes due to breaking changes 3b648894 CPack/Deb package release number in file name 316dd613 CPack/Deb proper package file naming 271e03f0 CPack/Deb per-component package architecture 23baaf8d CPack/Deb inter package dependencies 3a55a0e7 CPack/Deb proper component packages file naming c7f388e7 CPack/Deb generation of postinst and postrm ldconfig files 2d589653 CPack/Deb generation of DEBIAN/shlibs control file
| * CPack/Deb test changes due to breaking changesDomen Vrankar2016-05-1327-29/+211
| | | | | | | | | | | | New CPack/Deb tests and changes to old tests as package file names and inter component dependency detection was changed.
* | InstallRequiredSystemLibraries: Optionally install Windows UCRT (#16073)Brad King2016-05-122-0/+2
| |
* | Tests: Wrap long comment lines in VSXaml testBrad King2016-05-111-7/+9
| | | | | | | | | | Manually wrap the lines and remove literal tab characters. This avoids problems with incremental formatting by clang-format.
* | Tests: Protect unicode literals from clang-format Cpp03 formattingBrad King2016-05-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | Since CMake is written in C++98 any clang-format configuration must set `Standard` to `Cpp03` so that `A<A<int> >` is not rewritten as `A<A<int>>`. However, this will cause `U"foo"` to be rewritten as `U "foo"`. Add markup to turn clang-format off in the one place that the latter case occurs so that we do not need a separate `.clang-format` config file for it. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* | Drop find_(library|file|path) prefixes from PATH on non-WindowsBrad King2016-05-093-3/+9
|/ | | | | | | | | | | Since commit v3.3.0-rc1~430^2 (Teach find_(library|file|path) to get prefixes from PATH, 2015-02-18) we search in <prefix>/include and <prefix>/lib directories for prefixes with bin directories in the PATH environment variable. The motivation was to support MSYS, MinGW and similar Windows platforms in their default environments automatically. At the time this behavior was thought to be worthwhile in general. Suggested-by: Chuck Atkins <chuck.atkins@kitware.com>
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* Merge topic 'custom-command-CROSSCOMPILING_EMULATOR'Brad King2016-05-098-1/+134
|\ | | | | | | | | 8c2cedc6 CustomCommandGenerator: Add support for CROSSCOMPILING_EMULATOR
| * CustomCommandGenerator: Add support for CROSSCOMPILING_EMULATORJean-Christophe Fillion-Robin2016-05-098-1/+134
| | | | | | | | | | | | Teach the `add_custom_command` and `add_custom_target' commands to substitute argv0 with the crosscompiling emulator if it is a target with the `CROSSCOMPILING_EMULATOR` property set.
* | Help clang-format wrap after braces on long initializer listsBrad King2016-05-061-0/+2
|/ | | | | | Add a long comment inside a few braced initializer lists in order to convince clang-format to break after the opening brace and format the list without indenting every value past the opening brace.
* Tests: Improve source file name in RunCMake.CrosscompilingEmulatorJean-Christophe Fillion-Robin2016-05-035-7/+9
| | | | | The test executable returns with an error, so indicate this in the source name.
* Tests: Cover genex behavior in CROSSCOMPILING_EMULATOR test caseJean-Christophe Fillion-Robin2016-05-033-4/+35
| | | | | | | | A `$<TARGET_FILE:tgt>` generator expression does not cause insertion of the emulator. Add a test covering this. While at it, extend the test case to cover executables in a subdirectory. Also make the test matching expressions more robust to support multiple add_test calls without mixing them while matching.
* Merge topic 'doc-cmake-policies-manual-improvements'Brad King2016-05-031-2/+2
|\ | | | | | | | | | | | | | | 5f948d2a Help: Add policy summaries to cmake-policies(7) b74d73e5 Help: Organize cmake-policies(7) manual by version of introduction de370656 cmRST: Parse toctree lines with Sphinx cross-reference syntax 845cb217 CMP0059: Fix typo in policy description
| * CMP0059: Fix typo in policy descriptionBrad King2016-05-021-2/+2
| |
* | Merge topic 'clang-format-include-order'Brad King2016-05-032-2/+3
|\ \ | |/ |/| | | | | | | | | | | | | 54f71cd7 Source: Sort includes the way clang-format would 7b6ffa59 Source: Sort includes of sys/types.h as clang-format would be14fe48 Source: Stabilize include order of sys/types.h before sys/stat.h 5e871f70 Tests: Sort includes of sys/types.h as clang-format would a20d7d48 Tests: Fix Plugin test include order
| * Tests: Sort includes of sys/types.h as clang-format wouldBrad King2016-05-031-1/+1
| |
| * Tests: Fix Plugin test include orderBrad King2016-05-031-1/+2
| | | | | | | | | | | | | | | | Fix the order accidentally broken by commit e1c77472 (Format include directive blocks and ordering with clang-format, 2016-04-29). Include the KWSys header first in its own block so that it is not moved by tools that re-order includes. It must be included first to define large file support macros consistently.
* | Merge topic 'test-watcom-workaround'Brad King2016-05-023-2/+3
|\ \ | | | | | | | | | | | | | | | 47c29885 Tests: Fix RunCMake.BuildDepends filesystem delay for Watcom WMake 26790ad9 Tests: Add workaround to Wrapping test for Watcom failure
| * | Tests: Fix RunCMake.BuildDepends filesystem delay for Watcom WMakeBrad King2016-04-291-1/+2
| | | | | | | | | | | | | | | Our 1.125s delay does not seem to be long enough to be reliable with the Watcom `wmake` tool. Use a longer delay for Watcom.
| * | Tests: Add workaround to Wrapping test for Watcom failureBrad King2016-04-282-1/+1
| | | | | | | | | | | | | | | | | | The Watcom tools do not seem to like our wrapFLTK executable to mix C and C++ sources. Work around this by using C++ for both sources.
* | | Merge topic 'clang-format-include-order'Brad King2016-05-0275-107/+119
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | e1c77472 Format include directive blocks and ordering with clang-format 180538c7 Source: Stabilize include order 0e7bca92 Utilities/Release: Stabilize include order in WiX custom action eb817be0 Tests: Stabilize include order in MFC, VSXaml, and VSWinStorePhone eda313b4 Tests: Stabilize include order in StringFileTest 7110b754 CursesDialog: add missing cmState include d7a5f255 Modules: Remove unused CMakeTestWatcomVersion.c file
| * | Format include directive blocks and ordering with clang-formatBrad King2016-04-2965-106/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
| * | Tests: Stabilize include order in MFC, VSXaml, and VSWinStorePhoneBrad King2016-04-2911-1/+13
| | | | | | | | | | | | | | | | | | These tests use a precompiled header that must be included first. Include the header in an isolated block so that tools that sort includes do not move it.
| * | Tests: Stabilize include order in StringFileTestDaniel Pfeifer2016-04-291-0/+1
| |/ | | | | | | | | | | This test generates a header file which is not self-contained. Include it in a separate block of includes so that tools that sort includes do not move it.
* | Deprecate Visual Studio 7 .NET 2003 generatorBrad King2016-04-285-0/+15
| | | | | | | | | | Update documentation to mark the generator deprecated. Add a warning at the end of generation plus an option to turn off the warning.
* | Tests: Drop test for VS 7.0 generator deprecation warningsBrad King2016-04-285-15/+0
|/ | | | | We removed this generator but forgot to remove this now-unused test case.
* Merge topic 'intel-compiler-features'Brad King2016-04-282-5/+91
|\ | | | | | | | | | | | | | | | | | | | | 21b1fa5c Help: Add notes for topic 'intel-compiler-features' 9addce99 Features: Record standard flags for Intel C/C++ on Windows 15a6c950 WCDH: Add Intel to list of supported compilers 36f32ede Features: Record standards and features for Intel C on UNIX d028b948 Features: Specify minimum version Intel C++ 12.1 be910f00 Features: Record standards and features for Intel C++ on UNIX 7f401ae4 Features: Detect C default dialect on MSVC-like compilers