summaryrefslogtreecommitdiffstats
path: root/Tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * WCDH: Add Intel to list of supported compilersRobert Maynard2016-04-281-5/+9
| |
| * Features: Record standards and features for Intel C on UNIXRobert Maynard2016-04-281-0/+10
| | | | | | | | | | Record features for Intel C 12.1 and above. Skip this for now on Windows (where Intel C simulates MSVC).
| * Features: Record standards and features for Intel C++ on UNIXLevi Morrison2016-04-281-0/+72
| | | | | | | | Skip this for now on Windows (where Intel C++ simulates MSVC).
* | Merge topic 'ExternalProject-git-clone-shallow'Brad King2016-04-281-0/+17
|\ \ | | | | | | | | | | | | 7db9f3f2 ExternalProject: Add option to perform a shallow Git clone (#15291)
| * | ExternalProject: Add option to perform a shallow Git clone (#15291)Brad King2016-04-271-0/+17
| | | | | | | | | | | | Inspired-by: Ilya Kulakov <kulakov.ilya@gmail.com>
* | | GHS: Fix handling of duplicate source filenames (#16046)Geoff Viola2016-04-255-0/+40
|/ / | | | | | | | | Green Hills MULTI project files must specify explicitly distinct object file names for source files with the same name.
* | Merge topic 'autogen-updates'Brad King2016-04-2219-0/+234
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 84946c73 Tests: QtAutogen: Same source name in different directories test 9c6fa684 Autogen: Generate qrc_NAME.cpp files in subdirectories 488ea8c7 Autogen: Generate not included moc files in subdirectories (#12873) 66caae45 Autogen: Check added for name collisions of generated qrc_NAME.cpp files 663d093d Autogen: Check added for name collisions of generated ui_NAME.h files 8295d437 Autogen: Check added for name collisions of generated moc files d350308a Help: Improve AUTOMOC documentation layout
| * | Tests: QtAutogen: Same source name in different directories testSebastian Holtermann2016-04-2219-0/+234
| |/ | | | | | | | | | | | | The test features multiple .cpp and .qrc files with the same name in different subdirectories. This requires AUTOMOC and AUTORCC to generate files with names that respect the path information of the source files.
* | FindBoost: Define Boost::boost for all boost versionsRoger Leigh2016-04-194-0/+30
|/
* 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 topic 'branch_coverage_glob'Brad King2016-04-073-0/+4
|\ \ | | | | | | | | | | | | | | | 8ea1b0df CTestCoverageCollectGCOV: Improve documentation 425d7646 CTestCoverageCollectGCOV: Honor CTEST_EXTRA_COVERAGE_GLOB
| * | CTestCoverageCollectGCOV: Honor CTEST_EXTRA_COVERAGE_GLOBZack Galbreath2016-04-073-0/+4
| | | | | | | | | | | | | | | | | | | | | Teach CTestCoverageCollectGCOV to honor the CTEST_EXTRA_COVERAGE_GLOB variable. When this variable is set, this module will glob for matching source files that were not covered and include them in the resulting tar file.
* | | Merge topic 'fix-target-alias-in-subdir'Brad King2016-04-051-0/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | 0e44f489 Rename local target lookup methods to clarify purpose bc30f8b5 Fix lookup of an ALIAS target outside aliased target's directory (#16044)
| * | | Fix lookup of an ALIAS target outside aliased target's directory (#16044)Brad King2016-04-011-0/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit v3.5.0-rc1~272^2~11 (cmTarget: Implement ALIAS in terms of name mapping, 2015-10-25) accidentally introduced logic that assumes ALIAS targets always reference targets in their own directory. Fix this and add a test case. The configure-step fix is that `cmMakefile::FindTarget` should not consider aliases. The purpose of this method is just to look up targets local to a directory. Since ALIAS and normal targets share a namespace we know a locally defined target will never collide with an ALIAS target anyway. The method has 3 call sites, and this change is safe for all of them: * `cmInstallCommand::HandleTargetsMode`: Rejects aliases before the call. * `cmFLTKWrapUICommand::FinalPass`: Should never have considered aliases. * `cmMakefile::FindTargetToUse`: Falls back to a global lookup anyway. The generate-step fix is that `cmLocalGenerator::FindGeneratorTarget` should not consider aliases. This method is the generate-step equivalent to the above. The method has 2 call sites, and this change is safe for both of them: * `cmInstallTargetGenerator::Compute`: Never uses an alias target name. * `cmLocalGenerator::FindGeneratorTargetToUse`: Falls back to global lookup. Reported-by: Matteo Settenvini <matteo@member.fsf.org>
| * | Merge branch 'fix-repeat-pkg-config' into releaseBrad King2016-03-211-5/+6
| |\ \
* | \ \ Merge topic 'cpack-rpm-external-symlink-handling'Brad King2016-04-012-0/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | eae4eef0 CPack/RPM external symlink handling
| * | | | CPack/RPM external symlink handlingDomen Vrankar2016-04-012-0/+6
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Symbolic links that point to external location no longer cause cmake to fail with string out of bounds error but are instead packaged as non relocatable symlinks and print out a warning message.
* | | | PushCheckStateTest: Update test to check CMAKE_EXTRA_INCLUDE_FILESJean-Christophe Fillion-Robin2016-03-311-0/+5
| | | |
* | | | PushCheckStateTest: Test all variables managed by the moduleJean-Christophe Fillion-Robin2016-03-311-9/+43
| | | |
* | | | PushCheckStateTest: Fix syntax warningJean-Christophe Fillion-Robin2016-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes the following warning originally introduced in 1325260 (Add macros cmake_push/pop_check_state() as discussed on the list.) Argument not separated from preceding token by whitespace.
* | | | Fix spelling typos in comments and documentation (#16037)Felix Geyer2016-03-291-1/+1
|/ / / | | | | | | | | | | | | The Debian package checker tool (lintian) detected several typos in CMake.
* | | cpack rpm setting of defattrDomen Vrankar2016-03-282-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | RPM supports setting of default user, group, file and directory permissions that will be applied for files in package unless specified per file/dir with attr setting This is related to bug report 14714